Skip to content

iomap: avoid soft lockup warnings on large ioends

Brian Foster linux-fsdevel linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 20 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iomap: resched ioend completion when in non-atomic contextfs/iomap/buffered-io.c fs/xfs/xfs_aops.c include/linux/iomap.h+11 -89 replies
2/3xfs: kick large ioends to completion workqueuefs/xfs/xfs_aops.c+14 -21 reply
3/3iomap: bound ioend size to 4096 pagesfs/iomap/buffered-io.c include/linux/iomap.h+30 -210 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchDarrick J. Wong
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] iomap: avoid soft lockup warnings on large ioends

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/[email protected]/
- Fix type in macro.
v1: https://lore.kernel.org/linux-xfs/[email protected]/
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(-)
Signature · 1 line
2.26.3