Potential fix for fdtable badness.
All,
Sorry about the recent fdtable badness that you all encountered. I'm working on getting a fix out there.
Dave, Olof, Linas, Bryce,
Could you please test the patch at the bottom of the email to see if it makes your computers happy again, if you have the time and inclination to do so?
Andrew,
Would you prefer me to resend a fixed patch #4, or a new fix (#5) on top of what's in your tree?
fs/file.c +1 -2
@@ -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 ;
Quoted 2 lines · On Tue, 10 Oct 2006 19:08:18 -0700 Vadim Lobanov <[email protected]> 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.
Quoted 4 lines
diff -Npru
old/fs/file.cnew/fs/file.c
fs/file.c static struct fdtable * alloc_fdtable(un · line 171
Quoted 10 lines
fs/file.c +1
-2@@ -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.
Quoted 8 lines · Andrew Morton
On Tue, 10 Oct 2006 19:08:18 -0700
Quoted 2 lines · Vadim Lobanov
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.
Quoted 16 lines
Quoted 4 lines
diff -Npru
old/fs/file.cnew/fs/file.cfs/file.c static struct fdtable * alloc_fdtable(un · line 171
Quoted 10 lines
fs/file.c +1
-2@@ -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.
I'll wrap the fixes up in incremental patches once the problem has been eradicated.
Quoted 9 lines · Vadim Lobanov
All,
Sorry about the recent fdtable badness that you all encountered. I'm working on getting a fix out there.
Dave, Olof, Linas, Bryce,
Could you please test the patch at the bottom of the email to see if it makes your computers happy again, if you have the time and inclination to do so?
The patch works for me. Thanks!
Shaggy
Quoted 19 lines
Andrew,
Would you prefer me to resend a fixed patch #4, or a new fix (#5) on top of what's in your tree?
diff -Npru
old/fs/file.cnew/fs/file.cfs/file.c +1
-2@@ -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 ;
Signature · 2 lines
David Kleikamp IBM Linux Technology Center
Quoted 9 lines · On Tue, 10 Oct 2006 19:08:18 -0700 Vadim Lobanov <[email protected]> wrote:
All,
Sorry about the recent fdtable badness that you all encountered. I'm working on getting a fix out there.
Dave, Olof, Linas, Bryce,
Could you please test the patch at the bottom of the email to see if it makes your computers happy again, if you have the time and inclination to do so?
Looks good to me.
-Olof
fs/file.c static struct fdtable * alloc_fdtable(un · line 168
Quoted 11 lines · Vadim Lobanov
Dave, Olof, Linas, Bryce,
Could you please test the patch at the bottom of the email to see if it makes your computers happy again, if you have the time and inclination to do so?
+++
new/fs/file.c2006-10-10 19:01:03.000000000 -0700fs/file.c +1
-2- nr++; nr /= (PAGE_SIZE /4 /sizeof (struct file *)); - nr =roundup_pow_of_two (nr); + nr =roundup_pow_of_two (nr +1 );
This fixed things for me!
--linas