[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806121054.19253.nickpiggin@yahoo.com.au>
Date: Thu, 12 Jun 2008 10:54:18 +1000
From: Nick Piggin <nickpiggin@...oo.com.au>
To: Rik van Riel <riel@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Lee Schermerhorn <lee.schermerhorn@...com>,
Kosaki Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-mm@...ck.org, Eric Whitney <eric.whitney@...com>
Subject: Re: [PATCH -mm 14/24] Ramfs and Ram Disk pages are unevictable
On Thursday 12 June 2008 04:42, Rik van Riel wrote:
> From: Lee Schermerhorn <Lee.Schermerhorn@...com>
>
> Christoph Lameter pointed out that ram disk pages also clutter the
> LRU lists. When vmscan finds them dirty and tries to clean them,
> the ram disk writeback function just redirties the page so that it
> goes back onto the active list. Round and round she goes...
> Index: linux-2.6.26-rc5-mm2/drivers/block/brd.c
> ===================================================================
> --- linux-2.6.26-rc5-mm2.orig/drivers/block/brd.c 2008-06-10
> 10:46:18.000000000 -0400 +++
> linux-2.6.26-rc5-mm2/drivers/block/brd.c 2008-06-10 16:47:23.000000000
> -0400 @@ -374,8 +374,21 @@ 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,
This isn't the case for brd any longer. It doesn't use the buffer
cache as its backing store, so the buffer cache is reclaimable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists