linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] iomap: avoid soft lockup warnings on large ioends
@ 2021-05-17 17:17 Brian Foster
  2021-05-17 17:17 ` [PATCH v3 1/3] iomap: resched ioend completion when in non-atomic context Brian Foster
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Brian Foster @ 2021-05-17 17:17 UTC (permalink / raw)
  To: linux-xfs; +Cc: linux-fsdevel

Hi all,

There's been a bit more feedback on v2 of this series so here's a v3
with some small changes. Patch 1 is unchanged and just allows iomap
ioend completion to reschedule when invoked from non-atomic context.
Matthew Wilcox argued that ioends larger than the 256kB-1MB or so range
should probably be processed outside of bio completion context, so patch
2 updates XFS to queue completion of ioends >=1MB (based on 4k pages) to
the same workqueue used for processing ioends that require post I/O
metadata changes. Finally, there's been some debate around whether we
should continue to construct somewhat arbitrarily large ioends from a
latency perspective, independent of the soft lockup warning that's been
reproduced when processing ioends with tens of GBs worth of pages. Dave
Chinner had proposed an ioend size limit of ~16MB, so patch 3 is an RFC
for that change (and includes a comment written by Dave on the
explanation).

This series survives fstests and I've run some basic fio buffered write
(overwrites only) performance testing to measure the potential latency
hit at the size threshold. fio shows an average latency increase of
~20us with 1MB random writes at a reduction of ~10iops while 4k random
writes show basically no change (as expected). I'm happy to run further
tests on request. Thoughts, reviews, flames appreciated.

Brian

v3:
- Rebase.
- Change wq completion size threshold to 1MB.
- Append RFC for 16MB ioend size limit.
v2: https://lore.kernel.org/linux-xfs/20201005152102.15797-1-bfoster@redhat.com/
- Fix type in macro.
v1: https://lore.kernel.org/linux-xfs/20201002153357.56409-1-bfoster@redhat.com/
rfc: https://lore.kernel.org/linux-fsdevel/20200825144917.GA321765@bfoster/

Brian Foster (3):
  iomap: resched ioend completion when in non-atomic context
  xfs: kick large ioends to completion workqueue
  iomap: bound ioend size to 4096 pages

 fs/iomap/buffered-io.c | 21 +++++++++++++--------
 fs/xfs/xfs_aops.c      | 18 +++++++++++++++---
 include/linux/iomap.h  | 28 +++++++++++++++++++++++++++-
 3 files changed, 55 insertions(+), 12 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2021-05-26  3:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 17:17 [PATCH v3 0/3] iomap: avoid soft lockup warnings on large ioends Brian Foster
2021-05-17 17:17 ` [PATCH v3 1/3] iomap: resched ioend completion when in non-atomic context Brian Foster
2021-05-17 17:54   ` Matthew Wilcox
2021-05-18 11:38     ` Brian Foster
2021-05-20 21:58       ` Darrick J. Wong
2021-05-24 11:57         ` Brian Foster
2021-05-24 16:53           ` Darrick J. Wong
2021-05-26  1:19             ` Darrick J. Wong
2021-05-22  7:45   ` Ming Lei
2021-05-24 11:57     ` Brian Foster
2021-05-24 14:11       ` Ming Lei
2021-05-17 17:17 ` [PATCH v3 2/3] xfs: kick large ioends to completion workqueue Brian Foster
2021-05-26  1:20   ` Darrick J. Wong
2021-05-17 17:17 ` [PATCH RFC v3 3/3] iomap: bound ioend size to 4096 pages Brian Foster
2021-05-19 13:28   ` Christoph Hellwig
2021-05-19 14:52     ` Brian Foster
2021-05-20 23:27   ` Darrick J. Wong
2021-05-24 12:02     ` Brian Foster
2021-05-25  4:20       ` Darrick J. Wong
2021-05-25  4:29         ` Damien Le Moal
2021-05-25  7:13         ` Dave Chinner
2021-05-25  9:07         ` Andreas Gruenbacher
2021-05-26  2:12         ` Matthew Wilcox
2021-05-26  3:32           ` Darrick J. Wong

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).