Commit 508f92275624fc755104b17945bdc822936f1918
1 parent
87b0fc7deb
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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: J. Bruce Fields <bfields@redhat.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/nfsd/nfssvc.c
... | ... | @@ -314,7 +314,7 @@ |
314 | 314 | unsigned long ret; |
315 | 315 | |
316 | 316 | si_meminfo(&i); |
317 | - target = i.totalram << PAGE_SHIFT; | |
317 | + target = (i.totalram - i.totalhigh) << PAGE_SHIFT; | |
318 | 318 | /* |
319 | 319 | * Aim for 1/4096 of memory per thread This gives 1MB on 4Gig |
320 | 320 | * machines, but only uses 32K on 128M machines. Bottom out at |