• Greg Banks's avatar
    [PATCH] knfsd: make nfsd readahead params cache SMP-friendly · fce1456a
    Greg Banks authored
    Make the nfsd read-ahead params cache more SMP-friendly by changing the single
    global list and lock into a fixed 16-bucket hashtable with per-bucket locks.
    This reduces spinlock contention in nfsd_read() on read-heavy workloads on
    multiprocessor servers.
    
    Testing was on a 4 CPU 4 NIC Altix using 4 IRIX clients each doing 1K
    streaming reads at full line rate.  The server had 128 nfsd threads, which
    sizes the RA cache at 256 entries, of which only a handful were used.  Flat
    profiling shows nfsd_read(), including the inlined nfsd_get_raparms(), taking
    10.4% of each CPU.  This patch drops the contribution from nfsd() to 1.71% for
    each CPU.
    Signed-off-by: default avatarGreg Banks <gnb@melbourne.sgi.com>
    Signed-off-by: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    fce1456a
vfs.c 46.1 KB