Skip to content

new APIs to allocate buffer-cache with user specific flag

Gioh Kim linux-ext4 linux-fsdevel lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 12 repliesIn review
  2. v33 patches 8 repliesSuperseded
  3. v23 patches 6 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fs.c: support buffer cache allocations with gfp modifiersfs/buffer.c include/linux/buffer_head.h+68 -241 reply
2/3ext4: use non-movable memory for the ext4 superblockfs/ext4/super.c+3 -31 reply
3/3jbd/jbd2: use non-movable memory for the jbd superblockfs/jbd/journal.c fs/jbd2/journal.c+2 -21 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/3R-b
2/3R-b
3/3R-b

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

Read the v4 thread

Cover letter [PATCHv4 0/3] new APIs to allocate buffer-cache with user specific flag

Hello,

This patch try to solve problem that a long-lasting page caches of ext4 superblock and journaling of superblock disturb page migration.

I've been testing CMA feature on my ARM-based platform
and found that two page caches cannot be migrated.
They are page caches of superblock of ext4 filesystem and its journaling data.

Current ext4 reads superblock with sb_bread() that allocates page from movable area. But the problem is that ext4 hold the page until it is unmounted. If root filesystem is ext4 the page cannot be migrated forever.
And also the journaling data for the superblock cannot be migreated.

I introduce new APIs that allocates page cache with specific flag passed by an argument.
*_gfp APIs are for user want to set page allocation flag for page cache allocation.
And *_unmovable APIs are for the user wants to allocate page cache from non-movable area.

It is useful for ext4/ext3 and others that want to hold page cache for a long time.

I have 3 patchs:

1. Patch 1/3: introduce a new API that create page cache with allocation flag
2. Patch 2/3: have ext4 use the new API to read superblock
3. Patch 3/3: have jbd/jbd2 use the new API to make journaling of superblock

This patchset is based on linux-next-20140814.

Thanks a lot.

Gioh Kim (3):
fs.c: support buffer cache allocations with gfp modifiers
ext4: use non-movable memory for the ext4 superblock jbd/jbd2: use non-movable memory for the jbd superblock

 fs/buffer.c                 |   45 ++++++++++++++++++++++++-----------------
 fs/ext4/super.c             |    6 +++---
 fs/jbd/journal.c            |    2 +-
 fs/jbd2/journal.c           |    2 +-
 include/linux/buffer_head.h |   47 ++++++++++++++++++++++++++++++++++++++-----
 5 files changed, 73 insertions(+), 29 deletions(-)
Signature · 1 line
1.7.9.5