Commit 508f9227 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: fix default iosize calculation on 32bit

The rpc buffers will be allocated out of low memory, so we should really
only be taking that into account.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 87b0fc7d
...@@ -314,7 +314,7 @@ static int nfsd_get_default_max_blksize(void) ...@@ -314,7 +314,7 @@ static int nfsd_get_default_max_blksize(void)
unsigned long ret; unsigned long ret;
si_meminfo(&i); si_meminfo(&i);
target = i.totalram << PAGE_SHIFT; target = (i.totalram - i.totalhigh) << PAGE_SHIFT;
/* /*
* Aim for 1/4096 of memory per thread This gives 1MB on 4Gig * Aim for 1/4096 of memory per thread This gives 1MB on 4Gig
* machines, but only uses 32K on 128M machines. Bottom out at * machines, but only uses 32K on 128M machines. Bottom out at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment