linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/2] avoid xfs transaction reservation recursion
@ 2020-10-09 12:51 Yafang Shao
  2020-10-09 12:51 ` [PATCH v8 1/2] mm: Add become_kswapd and restore_kswapd Yafang Shao
  2020-10-09 12:51 ` [PATCH v8 2/2] xfs: avoid transaction reservation recursion Yafang Shao
  0 siblings, 2 replies; 8+ messages in thread
From: Yafang Shao @ 2020-10-09 12:51 UTC (permalink / raw)
  To: david, hch, darrick.wong, willy, mhocko, akpm
  Cc: linux-xfs, linux-fsdevel, linux-mm, Yafang Shao

This patchset avoids transaction reservation recursion by reintroducing
the discarded PF_FSTRANS in a new way, suggested by Dave. In this new
implementation, four new helpers are introduced, which are
xfs_trans_context_{set, clear, update, active},
suggested by Dave. And re-using the task->journal_info to indicates
whehter the task is in fstrans or not, suggested by Willy

Patch #1 is picked from Willy's patchset "Overhaul memalloc_no*"[1]

[1] https://lore.kernel.org/linux-mm/20200625113122.7540-1-willy@infradead.org/

v8:
- check xfs_trans_context_active() in xfs_vm_writepage(s), per Dave.

v7:
- check fstrans recursion for XFS only, by introducing a new member in
  struct writeback_control.

v6:
- add Michal's ack and comment in patch #1.

v5:
- pick one of Willy's patch
- introduce four new helpers, per Dave

v4:
- retitle from "xfs: introduce task->in_fstrans for transaction reservation recursion protection"
- reuse current->journal_info, per Willy

Matthew Wilcox (Oracle) (1):
  mm: Add become_kswapd and restore_kswapd

Yafang Shao (1):
  xfs: avoid transaction reservation recursion

 fs/iomap/buffered-io.c    |  7 -------
 fs/xfs/libxfs/xfs_btree.c | 14 ++++++++------
 fs/xfs/xfs_aops.c         | 23 +++++++++++++++++++++--
 fs/xfs/xfs_linux.h        |  4 ----
 fs/xfs/xfs_trans.c        | 19 +++++++++----------
 fs/xfs/xfs_trans.h        | 30 ++++++++++++++++++++++++++++++
 include/linux/sched/mm.h  | 23 +++++++++++++++++++++++
 mm/vmscan.c               | 16 +---------------
 8 files changed, 92 insertions(+), 44 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-10-15  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 12:51 [PATCH v8 0/2] avoid xfs transaction reservation recursion Yafang Shao
2020-10-09 12:51 ` [PATCH v8 1/2] mm: Add become_kswapd and restore_kswapd Yafang Shao
2020-10-09 15:53   ` Darrick J. Wong
2020-10-15  8:30   ` Christoph Hellwig
2020-10-09 12:51 ` [PATCH v8 2/2] xfs: avoid transaction reservation recursion Yafang Shao
2020-10-09 13:35   ` Matthew Wilcox
2020-10-09 16:00   ` Darrick J. Wong
2020-10-15  8:31   ` Christoph Hellwig

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