Skip to content

Overhaul memalloc_no*

Matthew Wilcox (Oracle) dm-devel linux-mm linux-xfs lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: Replace PF_MEMALLOC_NOIO with memalloc_noiodrivers/block/loop.c drivers/md/dm-zoned-metadata.c include/linux/sched.h +2 more+31 -173 replies
2/6mm: Add become_kswapd and restore_kswapdfs/xfs/libxfs/xfs_btree.c include/linux/sched/mm.h mm/vmscan.c+35 -211 reply
3/6xfs: Convert to memalloc_nofs_savefs/xfs/kmem.c fs/xfs/xfs_aops.c fs/xfs/xfs_buf.c +3 more+12 -180 replies
4/6mm: Replace PF_MEMALLOC_NOFS with memalloc_nofsfs/iomap/buffered-io.c include/linux/sched.h include/linux/sched/mm.h+8 -91 reply
5/6mm: Replace PF_MEMALLOC_NOIO with memalloc_nocmainclude/linux/sched.h include/linux/sched/mm.h+8 -90 replies
6/6mm: Add memalloc_nowaitdrivers/md/dm-bufio.c include/linux/sched.h include/linux/sched/mm.h+17 -2615 replies

Reviews trailers per patch

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

PatchMichal Hocko
1/6A-b
2/6A-b
3/6
4/6A-b
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH 0/6] Overhaul memalloc_no*

I want a memalloc_nowait like we have memalloc_noio and memalloc_nofs for an upcoming patch series, and Jens also wants it for non-blocking io_uring. It turns out we already have dm-bufio which could benefit from memalloc_nowait, so it may as well go into the tree now.

The biggest problem is that we're basically out of PF_ flags, so we need to find somewhere else to store the PF_MEMALLOC_NOWAIT flag. It turns out the PF_ flags are really supposed to be used for flags which are accessed from other tasks, and the MEMALLOC flags are only going to be used by this task. So shuffling everything around frees up some PF flags and generally makes the world a better place.

Patch series also available from
http://git.infradead.org/users/willy/linux.git/shortlog/refs/heads/memalloc

Matthew Wilcox (Oracle) (6):
mm: Replace PF_MEMALLOC_NOIO with memalloc_noio
mm: Add become_kswapd and restore_kswapd
xfs: Convert to memalloc_nofs_save
mm: Replace PF_MEMALLOC_NOFS with memalloc_nofs
mm: Replace PF_MEMALLOC_NOIO with memalloc_nocma
mm: Add memalloc_nowait

 drivers/block/loop.c           |  3 +-
 drivers/md/dm-bufio.c          | 30 ++++--------
 drivers/md/dm-zoned-metadata.c |  5 +-
 fs/iomap/buffered-io.c         |  2 +-
 fs/xfs/kmem.c                  |  2 +-
 fs/xfs/libxfs/xfs_btree.c      | 14 +++---
 fs/xfs/xfs_aops.c              |  4 +-
 fs/xfs/xfs_buf.c               |  2 +-
 fs/xfs/xfs_linux.h             |  6 ---
 fs/xfs/xfs_trans.c             | 14 +++---
 fs/xfs/xfs_trans.h             |  2 +-
 include/linux/sched.h          |  7 +--
 include/linux/sched/mm.h       | 84 ++++++++++++++++++++++++++--------
 kernel/sys.c                   |  8 ++--
 mm/vmscan.c                    | 16 +------
 15 files changed, 105 insertions(+), 94 deletions(-)
Signature · 1 line
2.27.0