mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
867da60d46
Multi-threaded buffered reads to the same file exposed significant
inode spinlock contention in nfs_clear_invalid_mapping().
Eliminate this spinlock contention by checking flags without locking,
instead using smp_rmb and smp_load_acquire accordingly, but then take
spinlock and double-check these inode flags.
Also refactor nfs_set_cache_invalid() slightly to use
smp_store_release() to pair with nfs_clear_invalid_mapping()'s
smp_load_acquire().
While this fix is beneficial for all multi-threaded buffered reads
issued by an NFS client, this issue was identified in the context of
surprisingly low LOCALIO performance with 4K multi-threaded buffered
read IO. This fix dramatically speeds up LOCALIO performance:
before: read: IOPS=1583k, BW=6182MiB/s (6482MB/s)(121GiB/20002msec)
after: read: IOPS=3046k, BW=11.6GiB/s (12.5GB/s)(232GiB/20001msec)
Fixes:
|
||
---|---|---|
.. | ||
blocklayout | ||
filelayout | ||
flexfilelayout | ||
cache_lib.c | ||
cache_lib.h | ||
callback_proc.c | ||
callback_xdr.c | ||
callback.c | ||
callback.h | ||
client.c | ||
delegation.c | ||
delegation.h | ||
dir.c | ||
direct.c | ||
dns_resolve.c | ||
dns_resolve.h | ||
export.c | ||
file.c | ||
fs_context.c | ||
fscache.c | ||
fscache.h | ||
getroot.c | ||
inode.c | ||
internal.h | ||
io.c | ||
iostat.h | ||
Kconfig | ||
localio.c | ||
Makefile | ||
mount_clnt.c | ||
namespace.c | ||
netns.h | ||
nfs2super.c | ||
nfs2xdr.c | ||
nfs3_fs.h | ||
nfs3acl.c | ||
nfs3client.c | ||
nfs3proc.c | ||
nfs3super.c | ||
nfs3xdr.c | ||
nfs4_fs.h | ||
nfs4client.c | ||
nfs4file.c | ||
nfs4getroot.c | ||
nfs4idmap.c | ||
nfs4idmap.h | ||
nfs4namespace.c | ||
nfs4proc.c | ||
nfs4renewd.c | ||
nfs4session.c | ||
nfs4session.h | ||
nfs4state.c | ||
nfs4super.c | ||
nfs4sysctl.c | ||
nfs4trace.c | ||
nfs4trace.h | ||
nfs4xdr.c | ||
nfs42.h | ||
nfs42proc.c | ||
nfs42xattr.c | ||
nfs42xdr.c | ||
nfs.h | ||
nfsroot.c | ||
nfstrace.c | ||
nfstrace.h | ||
pagelist.c | ||
pnfs_dev.c | ||
pnfs_nfs.c | ||
pnfs.c | ||
pnfs.h | ||
proc.c | ||
read.c | ||
super.c | ||
symlink.c | ||
sysctl.c | ||
sysfs.c | ||
sysfs.h | ||
unlink.c | ||
write.c |