Skip to content

Commit

Permalink
block: bdev: blockdev page cache is movable
Browse files Browse the repository at this point in the history
While inspecting page blocks for the type of pages in them, I noticed
a large number of blockdev cache in unmovable blocks. However, these
pages are actually on the LRU, and their mapping has a .migrate_folio
callback; they can be reclaimed and compacted as necessary.

Put them into movable blocks, so they don't cause pollution, and
subsequent proliferation, of unmovable blocks.

Signed-off-by: Johannes Weiner <[email protected]>
  • Loading branch information
hnaz committed Mar 9, 2023
1 parent 8483dea commit 7eb4502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno)
inode->i_mode = S_IFBLK;
inode->i_rdev = 0;
inode->i_data.a_ops = &def_blk_aops;
mapping_set_gfp_mask(&inode->i_data, GFP_USER);
mapping_set_gfp_mask(&inode->i_data, GFP_USER|__GFP_MOVABLE);

bdev = I_BDEV(inode);
mutex_init(&bdev->bd_fsfreeze_mutex);
Expand Down

0 comments on commit 7eb4502

Please sign in to comment.