From: Andrew Morton <akpm@osdl.org>
To: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>,
Olof Johansson <olof@lixom.net>,
Linas Vepstas <linas@austin.ibm.com>,
Bryce Harrington <bryce@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: Potential fix for fdtable badness.
Date: Tue, 10 Oct 2006 19:31:11 -0700 [thread overview]
Message-ID: <20061010193111.82a15ece.akpm@osdl.org> (raw)
In-Reply-To: <200610101908.18442.vlobanov@speakeasy.net>
On Tue, 10 Oct 2006 19:08:18 -0700
Vadim Lobanov <vlobanov@speakeasy.net> wrote:
> Would you prefer me to resend a fixed patch #4, or a new fix (#5) on top of
> what's in your tree?
Incremental updates are preferred.
> diff -Npru old/fs/file.c new/fs/file.c
> --- old/fs/file.c 2006-10-10 18:58:21.000000000 -0700
> +++ new/fs/file.c 2006-10-10 19:01:03.000000000 -0700
> @@ -164,9 +164,8 @@ static struct fdtable * alloc_fdtable(un
> * the fdarray into page-sized chunks: starting at a quarter of a page,
> * and growing in powers of two from there on.
> */
> - nr++;
> nr /= (PAGE_SIZE / 4 / sizeof(struct file *));
> - nr = roundup_pow_of_two(nr);
> + nr = roundup_pow_of_two(nr + 1);
> nr *= (PAGE_SIZE / 4 / sizeof(struct file *));
> if (nr > NR_OPEN)
> nr = NR_OPEN;
Like that.
next prev parent reply other threads:[~2006-10-11 2:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 2:08 Vadim Lobanov
2006-10-11 2:31 ` Andrew Morton [this message]
2006-10-11 2:39 ` Vadim Lobanov
2006-10-11 12:42 ` Dave Kleikamp
2006-10-11 17:10 ` Olof Johansson
2006-10-11 20:13 ` Linas Vepstas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061010193111.82a15ece.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=bryce@osdl.org \
--cc=linas@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=shaggy@austin.ibm.com \
--cc=vlobanov@speakeasy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®