Skip to content

Commit

Permalink
nfsd: fix default iosize calculation on 32bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields committed Feb 3, 2012
1 parent 87b0fc7 commit 508f922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int nfsd_get_default_max_blksize(void)
unsigned long ret;

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
* machines, but only uses 32K on 128M machines. Bottom out at
Expand Down

0 comments on commit 508f922

Please sign in to comment.