undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
Subsystems (2)
PATCH 1/1 undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
Undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch. The brd pages do not live on the LRU at all, so there is no need to play these tricks.
--- drivers/block/brd.c | 13 ------------- 1 file changed, 13 deletions(-)
drivers/block/brd.c +0 -13
@@ -374,21 +374,8 @@ static int brd_ioctl(struct inode *inodereturn error; } -/* -* brd_open(): -* Just mark the mapping as containing unevictable pages -*/ -static int brd_open (struct inode *inode,struct file *filp) -{ -struct address_space *mapping = inode->i_mapping; - -mapping_set_unevictable (mapping); -return 0 ; -} -static struct block_device_operations brd_fops = { .owner =THIS_MODULE , - .open = brd_open, .ioctl = brd_ioctl, #ifdef CONFIG_BLK_DEV_XIP .direct_access = brd_direct_access,
Quoted 3 lines · Rik van Riel
Undo the
brd.cpart of ramfs-and-ram-disk-pages-are-unevictable.patch. The brd pages do not live on the LRU at all, so there is no need to play these tricks.
Does this mean that these pages cannot be migrated? E.g., to evacuate memory for hotplug? Looks like all paths to migrate_pages() construct a list of pages to migrate by isolating them from the lru [isolate_lru_page()]. Any pages not found in the lru are skipped.
Lee
Quoted 35 lines
Debugged-by Nick Piggin <[email protected]>Signed-off-by Rik van Riel <[email protected]>--- drivers/block/brd.c | 13 ------------- 1 file changed, 13 deletions(-)Index:
linux-2.6.26-rc5-mm2/drivers/block/brd.c
===================================================================drivers/block/brd.c +0
-13@@ -374,21 +374,8 @@ static int brd_ioctl(struct inode *inodereturn error; } -/* -* brd_open(): -* Just mark the mapping as containing unevictable pages -*/ -static int brd_open (struct inode *inode,struct file *filp) -{ -struct address_space *mapping = inode->i_mapping; - -mapping_set_unevictable (mapping); -return 0 ; -} -static struct block_device_operations brd_fops = { .owner =THIS_MODULE , - .open = brd_open, .ioctl = brd_ioctl, #ifdef CONFIG_BLK_DEV_XIP .direct_access = brd_direct_access,
Quoted 9 lines · On Thu, 12 Jun 2008 15:00:57 -0400 Lee Schermerhorn <[email protected]>…
Quoted 3 lines · Rik van Riel
Undo the
brd.cpart of ramfs-and-ram-disk-pages-are-unevictable.patch. The brd pages do not live on the LRU at all, so there is no need to play these tricks.Does this mean that these pages cannot be migrated? E.g., to evacuate memory for hotplug? Looks like all paths to
migrate_pages()construct a list of pages to migrate by isolating them from the lru [isolate_lru_page()]. Any pages not found in the lru are skipped.
It looks like that, indeed.
Signature · 1 line
All Rights Reversed
Quoted 9 lines · Lee Schermerhorn
Quoted 3 lines · Rik van Riel
Undo the
brd.cpart of ramfs-and-ram-disk-pages-are-unevictable.patch. The brd pages do not live on the LRU at all, so there is no need to play these tricks.Does this mean that these pages cannot be migrated? E.g., to evacuate memory for hotplug? Looks like all paths to
migrate_pages()construct a list of pages to migrate by isolating them from the lru [isolate_lru_page()]. Any pages not found in the lru are skipped.
Yes. They have nothing to do with user pages or pagecache pages at all really. brd is now a properly layered block device driver that does not know anything about buffer cache ;)
You can think of the pages it allocates as completely private, and they are used to implement the backing store for the block device.
The vm/fs layers will instantiate buffer cache over this device, which is reclaimable.