[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130515155601.370bb7c62a02487b422f7613@linux-foundation.org>
Date: Wed, 15 May 2013 15:56:01 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mel Gorman <mgorman@...e.de>
Cc: Alexey Lyahkov <alexey.lyashkov@...il.com>,
Andrew Perepechko <anserper@...ru>,
Robin Dong <sanbai@...bao.com>, Theodore Tso <tytso@....edu>,
Hugh Dickins <hughd@...gle.com>,
Rik van Riel <riel@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Bernd Schubert <bernd.schubert@...tmail.fm>,
David Howells <dhowells@...hat.com>,
Trond Myklebust <Trond.Myklebust@...app.com>,
Linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux-ext4 <linux-ext4@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH 4/4] mm: Remove lru parameter from __pagevec_lru_add and
remove parts of pagevec API
On Mon, 13 May 2013 11:21:22 +0100 Mel Gorman <mgorman@...e.de> wrote:
> Now that the LRU to add a page to is decided at LRU-add time, remove the
> misleading lru parameter from __pagevec_lru_add. A consequence of this is
> that the pagevec_lru_add_file, pagevec_lru_add_anon and similar helpers
> are misleading as the caller no longer has direct control over what LRU
> the page is added to. Unused helpers are removed by this patch and existing
> users of pagevec_lru_add_file() are converted to use lru_cache_add_file()
> directly and use the per-cpu pagevecs instead of creating their own pagevec.
Well maybe. The `lru' arg to __lru_cache_add is still there and is
rather misleading (I find it maddening ;)). AIUI, it's just there as
the means by which the __lru_cache_add() caller tells the LRU manager
that the caller wishes this page to start life on the active LRU, yes?
It doesn't _really_ specify an LRU list at all.
In which case I think it would be a heck of a lot clearer if the
callers were to do
SetPageActve(page);
__lru_cache_add(page);
no? (Or __lru_cache_add_active(page) and
__lru_cache_add_inactive(page) if one prefers).
Ditto lru_cache_add_lru() and probably other things. Let's have one
way of communicating activeness, not two.
--
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