From: J. Bruce Fields Date: Mon, 30 Jan 2012 21:21:11 +0000 (-0500) Subject: nfsd: fix default iosize calculation on 32bit X-Git-Tag: firefly_0821_release~3680^2~3201^2~48 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=508f92275624fc755104b17945bdc822936f1918;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index e9eb408ae2a8..aacf1f4b9fb5 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -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