Skip to content

Remove FGP_NOFS

Matthew Wilcox (Oracle) linux-erofs linux-ext4 linux-fsdevel linux-mm linux-nfs lkml ntfs sashiko-reviews 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mm: Improve memalloc_nofs_save() documentationinclude/linux/sched/mm.h mm/readahead.c+25 -201 reply
2/9ext4: Remove uses of FGP_NOFSfs/ext4/inline.c+2 -44 replies
3/9erofs: Remove redundant FGP_NOFSfs/erofs/internal.h+1 -12 replies
4/9nfs: Remove redundant FGP_NOFSfs/nfs/dir.c+1 -11 reply
5/9ntfs: Remove FGP_NOFS from __ntfs_inode_resident_attr_pwrite()fs/ntfs/inode.c+1 -11 reply
6/9ntfs: Remove redundant FGP_NOFS from ntfs_wof_collect_dest()fs/ntfs/wof.c+3 -41 reply
7/9squashfs: Remove use of FGP_NOFSfs/squashfs/file.c+4 -11 reply
8/9filemap: Remove redundant FGP_NOFSinclude/linux/pagemap.h+1 -11 reply
9/9filemap: Remove FGP_NOFSinclude/linux/pagemap.h mm/filemap.c+4 -82 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchJan KaraBaokun LiNamjae JeonZhang YiGao XiangTheodore Ts'o
1/9R-b
2/9R-b R-b R-b A-b
3/9R-b R-b
4/9R-b
5/9R-b
6/9R-b
7/9
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] Remove FGP_NOFS

There is broad agreement that we should eliminate __GFP_FS in favour of using memalloc_nofs_save(). This is a small step in that direction by getting rid of FGP_NOFS. It's also a nice simplification in its own right.

I added the documentation improvement at the start of this series, not because anything depends on that (obviously it doesn't), but because I thought the existing documentation was rather MM centric and it needs to be FS centric. Hopefully the cc'd filesystem maintainers will have the chance to look at patch 1 and see if it makes sense to them.

There's a few different solutions here:

- Filesystems specifying both FGP_NOWAIT and FGP_NOFS. If you're not waiting, it doesn't matter if you're allowed to reclaim from FS context or not, you're just not doing reclaim.
- We're already under memalloc_nofs.
- We can prove that the MM should be allowed to reclaim from filesystem memory (and so specifying FGP_NOFS was wrong).
- We can add a call to memalloc_nofs_save().

Matthew Wilcox (Oracle) (9):
mm: Improve memalloc_nofs_save() documentation
ext4: Remove uses of FGP_NOFS
erofs: Remove redundant FGP_NOFS
nfs: Remove redundant FGP_NOFS
ntfs: Remove FGP_NOFS from __ntfs_inode_resident_attr_pwrite()
ntfs: Remove redundant FGP_NOFS from ntfs_wof_collect_dest()
squashfs: Remove use of FGP_NOFS
filemap: Remove redundant FGP_NOFS
filemap: Remove FGP_NOFS

 fs/erofs/internal.h      |  2 +-
 fs/ext4/inline.c         |  6 ++----
 fs/nfs/dir.c             |  2 +-
 fs/ntfs/inode.c          |  2 +-
 fs/ntfs/wof.c            |  7 +++----
 fs/squashfs/file.c       |  5 ++++-
 include/linux/pagemap.h  | 12 +++++-------
 include/linux/sched/mm.h | 31 +++++++++++++++++++++++--------
 mm/filemap.c             |  2 --
 mm/readahead.c           | 14 ++------------
 10 files changed, 42 insertions(+), 41 deletions(-)
Signature · 1 line
2.47.3