On Tue, Aug 23, 2011 at 05:20:56AM -0400, Christoph Hellwig wrote:On Tue, Aug 23, 2011 at 06:56:21PM +1000, Dave Chinner wrote:From: Dave Chinner<dchinner@xxxxxxxxxx>
Several subsystems use the same construct for LRU lists - a list
head, a spin lock and and item count. They also use exactly the same
code for adding and removing items from the LRU. Create a generic
type for these LRU lists.
This is the beginning of generic, node aware LRUs for shrinkers to
work with.
Why list_lru vs the more natural sounding lru_list?
because the mmzone.h claimed that namespace:
enum lru_list {
LRU_INACTIVE_ANON = LRU_BASE,
LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE,
LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE,
LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE,
LRU_UNEVICTABLE,
NR_LRU_LISTS
};
and it is widely spewed through the mm code. I didn't really feel
like having to clean that mess up first....