Messages in this thread Patch in this message | | | From | NeilBrown <> | Date | Fri, 29 Sep 2006 13:08:50 +1000 | Subject | [PATCH 003 of 8] knfsd: Fix auto-sizing of nfsd request/reply buffers |
| |
totalram is measured in pages, not bytes, so PAGE_SHIFT must be used when trying to find 1/4096 of RAM.
Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output ./fs/nfsd/nfssvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c --- .prev/fs/nfsd/nfssvc.c 2006-09-29 11:44:32.000000000 +1000 +++ ./fs/nfsd/nfssvc.c 2006-09-29 11:57:27.000000000 +1000 @@ -209,7 +209,7 @@ int nfsd_create_serv(void) * Of course, this is only a default. */ nfsd_max_blksize = NFSSVC_MAXBLKSIZE; - i.totalram >>= 12; + i.totalram <<= PAGE_SHIFT - 12; while (nfsd_max_blksize > i.totalram && nfsd_max_blksize >= 8*1024*2) nfsd_max_blksize /= 2; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |