linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 0/3] xfs: speed up parallel workqueues
@ 2021-01-23 18:53 Darrick J. Wong
  2021-01-23 18:53 ` [PATCH 1/3] xfs: increase the default parallelism levels of pwork clients Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Darrick J. Wong @ 2021-01-23 18:53 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs, hch, david

Hi all,

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.

The final tweak is to enable WQ_SYSFS on all workqueues so that we can
monitor their concurrency management (or lack thereof) via sysfs.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=workqueue-speedups-5.12
---
 fs/xfs/xfs_iwalk.c     |    5 +----
 fs/xfs/xfs_log.c       |    4 ++--
 fs/xfs/xfs_mru_cache.c |    2 +-
 fs/xfs/xfs_pwork.c     |   21 ++-------------------
 fs/xfs/xfs_pwork.h     |    1 -
 fs/xfs/xfs_super.c     |   23 ++++++++++++++---------
 6 files changed, 20 insertions(+), 36 deletions(-)


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-01-27 23:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-23 18:53 [PATCHSET 0/3] xfs: speed up parallel workqueues Darrick J. Wong
2021-01-23 18:53 ` [PATCH 1/3] xfs: increase the default parallelism levels of pwork clients Darrick J. Wong
2021-01-24  9:57   ` Christoph Hellwig
2021-01-25 23:07     ` Darrick J. Wong
2021-01-26  5:04   ` [PATCH v2.1 " Darrick J. Wong
2021-01-26 20:46     ` Dave Chinner
2021-01-26 23:32       ` Darrick J. Wong
2021-01-23 18:53 ` [PATCH 2/3] xfs: use unbounded workqueues for parallel work Darrick J. Wong
2021-01-24  9:51   ` Christoph Hellwig
2021-01-25 23:18     ` Darrick J. Wong
2021-01-23 18:53 ` [PATCH 3/3] xfs: set WQ_SYSFS on all workqueues Darrick J. Wong
2021-01-24  9:54   ` Christoph Hellwig
2021-01-25 23:30     ` Darrick J. Wong
2021-01-26  5:06   ` [PATCH 4/3] xfs: set WQ_SYSFS on all workqueues in debug mode Darrick J. Wong
2021-01-26 20:48     ` Dave Chinner
2021-01-27 17:03     ` Christoph Hellwig
2021-01-27 23:29       ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).