Re: [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists

From: David Howells
Date: Mon Mar 23 2009 - 06:54:49 EST


Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> - if (page_is_file_cache(page))
> + if (mapping_unevictable(mapping))
> + add_page_to_unevictable_list(page);
> + else if (page_is_file_cache(page))

It would be nice to avoid adding an extra test and branch in here. This
function is used a lot, and quite often we know the answer to the first test
before we even get here.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/