Re: Why active list and inactive list?

From: Christoph Lameter
Date: Mon Jan 22 2007 - 22:53:51 EST


On Tue, 23 Jan 2007, Balbir Singh wrote:

> Yes, good point, I see what you mean in terms of impact. But the trade
> off could come from shrink_active_list() which does
>
> list_del(&page->lru)
> if (!reclaim_mapped && other_conditions)
> list_add(&page->lru, &l_active);
> ...
>
> In the case mentioned above, we would triple the cachlines when an area
> is mapped/unmapped (which might be acceptable since it is a state change
> for the page ;) ). In the trade-off I mentioned, it would happen
> everytime reclaim is invoked and it has nothing to do with a page changing
> state.
>
> Did I miss something?

We do the list_del/list_add right now in reclaim while moving pages
between active and inactive lists. However, reclaim is not run until the
systems is under memory pressure. Reclaim is run rarely and then lots of
these movements are occurring. At that point is it likely that the
cachelines are already available since the page structs had to be touched
for earlier movements.

-
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/