summaryrefslogtreecommitdiff
tag nameworkqueue-speedups_2021-02-22 (1c58ef771e61bc0e850e5da2a6b670d8330da06a)
tag date2021-02-22 18:58:28 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit b2aaabf359...
xfs: speed up parallel workqueues
After some discussion on IRC with Dave, we came to the conclusion that our background workqueue behavior could use some tweaking. Kernel worker threads that scan the filesystem and/or run their own transactions more closely fit the definition of an unbound workqueue -- the work items can take a long time, they don't have much in common with the submitter thread, the submitter isn't waiting hotly for a response, and we the process scheduler should deal with scheduling them. Furthermore, we don't want to place artificial limits on workqueue scaling because that can leave unused capacity while we're blocking (pwork is currently used for mount time quotacheck). Therefore, we switch pwork to use an unbound workqueue, and now we let the workqueue code figure out the relevant concurrency. We expose the pwork workqueue via sysfs, and document the interesting knobs in the administrator's guide. v2: expose all the workqueues via sysfs v3: only expose those workqueues that exist for kernel threads that create their own transactions, and update the admin guide.