* [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
@ 2008-06-12 17:53 Rik van Riel
2008-06-12 19:00 ` Lee Schermerhorn
0 siblings, 1 reply; 4+ messages in thread
From: Rik van Riel @ 2008-06-12 17:53 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Lee Schermerhorn, Nick Piggin
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.
Debugged-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Rik van Riel <riel@redhat.com>
---
drivers/block/brd.c | 13 -------------
1 file changed, 13 deletions(-)
Index: linux-2.6.26-rc5-mm2/drivers/block/brd.c
===================================================================
--- linux-2.6.26-rc5-mm2.orig/drivers/block/brd.c 2008-06-11 14:39:43.000000000 -0400
+++ linux-2.6.26-rc5-mm2/drivers/block/brd.c 2008-06-12 13:49:18.000000000 -0400
@@ -374,21 +374,8 @@ static int brd_ioctl(struct inode *inode
return 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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
2008-06-12 17:53 [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch Rik van Riel
@ 2008-06-12 19:00 ` Lee Schermerhorn
2008-06-12 19:05 ` Rik van Riel
2008-06-12 19:08 ` Nick Piggin
0 siblings, 2 replies; 4+ messages in thread
From: Lee Schermerhorn @ 2008-06-12 19:00 UTC (permalink / raw)
To: Rik van Riel; +Cc: akpm, linux-kernel, Nick Piggin
On Thu, 2008-06-12 at 13:53 -0400, Rik van Riel wrote:
> 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.
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
>
> Debugged-by: Nick Piggin <nickpiggin@yahoo.com.au>
> Signed-off-by: Rik van Riel <riel@redhat.com>
>
> ---
> drivers/block/brd.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> Index: linux-2.6.26-rc5-mm2/drivers/block/brd.c
> ===================================================================
> --- linux-2.6.26-rc5-mm2.orig/drivers/block/brd.c 2008-06-11 14:39:43.000000000 -0400
> +++ linux-2.6.26-rc5-mm2/drivers/block/brd.c 2008-06-12 13:49:18.000000000 -0400
> @@ -374,21 +374,8 @@ static int brd_ioctl(struct inode *inode
> return 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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
2008-06-12 19:00 ` Lee Schermerhorn
@ 2008-06-12 19:05 ` Rik van Riel
2008-06-12 19:08 ` Nick Piggin
1 sibling, 0 replies; 4+ messages in thread
From: Rik van Riel @ 2008-06-12 19:05 UTC (permalink / raw)
To: Lee Schermerhorn; +Cc: akpm, linux-kernel, Nick Piggin
On Thu, 12 Jun 2008 15:00:57 -0400
Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote:
> On Thu, 2008-06-12 at 13:53 -0400, Rik van Riel wrote:
> > 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.
>
> 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.
--
All Rights Reversed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch
2008-06-12 19:00 ` Lee Schermerhorn
2008-06-12 19:05 ` Rik van Riel
@ 2008-06-12 19:08 ` Nick Piggin
1 sibling, 0 replies; 4+ messages in thread
From: Nick Piggin @ 2008-06-12 19:08 UTC (permalink / raw)
To: Lee Schermerhorn; +Cc: Rik van Riel, akpm, linux-kernel
On Friday 13 June 2008 05:00, Lee Schermerhorn wrote:
> On Thu, 2008-06-12 at 13:53 -0400, Rik van Riel wrote:
> > 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.
>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-12 19:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-12 17:53 [PATCH] undo the brd.c part of ramfs-and-ram-disk-pages-are-unevictable.patch Rik van Riel
2008-06-12 19:00 ` Lee Schermerhorn
2008-06-12 19:05 ` Rik van Riel
2008-06-12 19:08 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®