knfsd: allocate readahead cache in individual chunks
authorJeff Layton <jlayton@redhat.com>
Thu, 14 Aug 2008 02:03:27 +0000 (22:03 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 29 Sep 2008 21:56:59 +0000 (17:56 -0400)
commit54a66e548079f12a6f54c3cae96812a9ed9b54ae
tree94d3bdeb77da374a15d01ba42fd8adcc677fe4d6
parente31a1b662f40fd460e982ef87582c66c51596cd0
knfsd: allocate readahead cache in individual chunks

I had a report from someone building a large NFS server that they were
unable to start more than 585 nfsd threads. It was reported against an
older kernel using the slab allocator, and I tracked it down to the
large allocation in nfsd_racache_init failing.

It appears that the slub allocator handles large allocations better,
but large contiguous allocations can often be problematic. There
doesn't seem to be any reason that the racache has to be allocated as a
single large chunk. This patch breaks this up so that the racache is
built up from separate allocations.

(Thanks also to Takashi Iwai for a bugfix.)

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Takashi Iwai <tiwai@suse.de>
fs/nfsd/vfs.c