[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061010193111.82a15ece.akpm@osdl.org>
Date: Tue, 10 Oct 2006 19:31:11 -0700
From: Andrew Morton <akpm@...l.org>
To: Vadim Lobanov <vlobanov@...akeasy.net>
Cc: Dave Kleikamp <shaggy@...tin.ibm.com>,
Olof Johansson <olof@...om.net>,
Linas Vepstas <linas@...tin.ibm.com>,
Bryce Harrington <bryce@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: Potential fix for fdtable badness.
On Tue, 10 Oct 2006 19:08:18 -0700
Vadim Lobanov <vlobanov@...akeasy.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists