1
0
Fork 0
alistair23-linux/fs/nfs
NeilBrown 0588b8a034 NFS: switch nfsiod to be an UNBOUND workqueue.
[ Upstream commit bf701b765e ]

nfsiod is currently a concurrency-managed workqueue (CMWQ).
This means that workitems scheduled to nfsiod on a given CPU are queued
behind all other work items queued on any CMWQ on the same CPU.  This
can introduce unexpected latency.

Occaionally nfsiod can even cause excessive latency.  If the work item
to complete a CLOSE request calls the final iput() on an inode, the
address_space of that inode will be dismantled.  This takes time
proportional to the number of in-memory pages, which on a large host
working on large files (e.g..  5TB), can be a large number of pages
resulting in a noticable number of seconds.

We can avoid these latency problems by switching nfsiod to WQ_UNBOUND.
This causes each concurrent work item to gets a dedicated thread which
can be scheduled to an idle CPU.

There is precedent for this as several other filesystems use WQ_UNBOUND
workqueue for handling various async events.

Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: ada609ee2a ("workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:16 +01:00
..
blocklayout treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
filelayout pNFS/filelayout: enable LAYOUTGET on OPEN 2019-09-24 16:28:38 -04:00
flexfilelayout pNFS/flexfiles: Fix list corruption if the mirror count changes 2020-06-30 15:37:12 -04:00
Kconfig nfs: NFS_SWAP should depend on SWAP 2020-02-14 16:34:10 -05:00
Makefile NFS: Create a root NFS directory in /sys/fs/nfs 2019-07-06 14:54:49 -04:00
cache_lib.c NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
cache_lib.h NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
callback.c SUNRPC: Cache the process user cred in the RPC server listener 2019-04-24 09:46:35 -04:00
callback.h NFS CB_OFFLOAD xdr 2018-08-09 12:56:38 -04:00
callback_proc.c NFSv4/pnfs: Return valid stateids in nfs_layout_find_inode_by_stateid() 2020-04-23 10:36:31 +02:00
callback_xdr.c SUNRPC/nfs: Fix return value for nfs4_callback_compound() 2019-04-24 09:46:34 -04:00
client.c nfs: add minor version to nfs_server_key for fscache 2020-04-01 11:01:50 +02:00
delegation.c NFS: Fix an RCU lock leak in nfs4_refresh_delegation_stateid() 2019-11-01 11:03:56 -04:00
delegation.h NFSv4: Don't allow a cached open with a revoked delegation 2019-11-01 10:59:26 -04:00
dir.c nfs: Fix security label length not being reset 2020-10-07 08:01:28 +02:00
direct.c SUNRPC reverting d03727b248 ("NFSv4 fix CLOSE not waiting for direct IO compeletion") 2020-07-29 10:18:29 +02:00
dns_resolve.c keys: Pass the network namespace into request_key mechanism 2019-06-27 23:02:12 +01:00
dns_resolve.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
export.c NFS: Pass the inode down to the getattr() callback 2018-06-04 12:07:07 -04:00
file.c nfs: nfs_file_write() should check for writeback errors 2020-08-21 13:05:36 +02:00
fscache-index.c nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:20:23 +02:00
fscache.c NFSv4: Fix fscache cookie aux_data to ensure change_attr is included 2020-05-20 08:20:23 +02:00
fscache.h nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:20:23 +02:00
getroot.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
inode.c NFS: switch nfsiod to be an UNBOUND workqueue. 2020-12-30 11:51:16 +01:00
internal.h NFS Client Updates for Linux 5.3 2019-09-26 12:20:14 -07:00
io.c NFS: Fix up documentation warnings 2019-02-20 15:14:21 -05:00
iostat.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mount_clnt.c NFSv3: fix rpc receive buffer size for MOUNT call 2020-05-20 08:20:27 +02:00
namespace.c NFS: fix nfs_path in case of a rename retry 2020-11-05 11:43:24 +01:00
netns.h NFS: Add sysfs support for per-container identifier 2019-07-06 14:54:49 -04:00
nfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs2super.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nfs2xdr.c NFSv2: Fix a typo in encode_sattr() 2020-01-17 19:48:47 +01:00
nfs3_fs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs3acl.c nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl 2020-05-06 08:15:16 +02:00
nfs3client.c pNFS: Allow multiple connections to the DS 2019-07-06 14:54:50 -04:00
nfs3proc.c NFSv3: use nfs_add_or_obtain() to create and reference inodes 2019-09-20 15:15:24 -04:00
nfs3super.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nfs3xdr.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-02-14 16:34:10 -05:00
nfs4_fs.h NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE 2020-11-05 11:43:31 +01:00
nfs4client.c nfs: add minor version to nfs_server_key for fscache 2020-04-01 11:01:50 +02:00
nfs4file.c NFS4: Fix oops when copy_file_range is attempted with NFS4.0 source 2020-11-05 11:43:14 +01:00
nfs4getroot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs4idmap.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
nfs4idmap.h NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4namespace.c NFS: Fix up documentation warnings 2019-02-20 15:14:21 -05:00
nfs4proc.c NFSv4.2: condition READDIR's mask for security label based on LSM state 2020-12-30 11:51:16 +01:00
nfs4renewd.c NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-14 16:34:11 -05:00
nfs4session.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
nfs4session.h NFSv4.1: Bump the default callback session slot count to 16 2019-03-02 16:25:26 -05:00
nfs4state.c nfs: fix NULL deference in nfs4_get_valid_delegation 2020-05-20 08:20:24 +02:00
nfs4super.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nfs4sysctl.c nfs: Do not convert nfs_idmap_cache_timeout to jiffies 2018-01-18 15:10:47 -05:00
nfs4trace.c pnfs/flexfiles: Add tracepoints for detecting pnfs fallback to MDS 2019-07-18 15:50:28 -04:00
nfs4trace.h NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE 2020-11-05 11:43:31 +01:00
nfs4xdr.c NFSv4: Fix the alignment of page data in the getdeviceinfo reply 2020-12-30 11:51:16 +01:00
nfs42.h NFSv4.2: Add client support for the generic 'layouterror' RPC call 2019-03-01 16:20:16 -05:00
nfs42proc.c NFS: Fix memory leaks 2020-02-24 08:37:02 +01:00
nfs42xdr.c NFSv4.2: Add client support for the generic 'layouterror' RPC call 2019-03-01 16:20:16 -05:00
nfsroot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfstrace.c NFS: Add trace events to report non-zero NFS status codes 2019-02-13 12:03:21 -05:00
nfstrace.h NFS: nfs_xdr_status should record the procedure name 2020-10-01 13:18:09 +02:00
pagelist.c NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests() 2020-10-01 13:17:52 +02:00
pnfs.c NFS: Don't return layout segments that are in use 2020-08-19 08:16:25 +02:00
pnfs.h pNFS: Handle NFS4ERR_OLD_STATEID on layoutreturn by bumping the state seqid 2019-09-20 15:48:35 -04:00
pnfs_dev.c NFS/flexfiles: Speed up read failover when DSes are down 2019-03-01 22:37:38 -05:00
pnfs_nfs.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-02-14 16:34:10 -05:00
proc.c NFSv2: Fix write regression 2019-08-27 10:24:56 -04:00
read.c NFS: Fix spurious EIO read errors 2019-08-26 15:31:29 -04:00
super.c NFS Client Updates for Linux 5.3 2019-09-26 12:20:14 -07:00
symlink.c nfs: pass the correct prototype to read_cache_page 2019-05-09 16:26:57 -04:00
sysctl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysfs.c NFS: Add sysfs support for per-container identifier 2019-07-06 14:54:49 -04:00
sysfs.h NFS: Add sysfs support for per-container identifier 2019-07-06 14:54:49 -04:00
unlink.c fsnotify: move fsnotify_nameremove() hook out of d_delete() 2019-06-20 14:47:44 +02:00
write.c NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests() 2020-10-01 13:17:52 +02:00