Re: why do we call clear_active_flags in shrink_inactive_list ?

From: Rik van Riel
Date: Wed Jan 02 2008 - 18:53:44 EST


On Sun, 30 Dec 2007 16:32:42 +0900
"minchan Kim" <barrioskmc@xxxxxxxxx> wrote:

> In 2.6.23's shrink_inactive_list function, why do we have to call
> clear_active_flags after isolate_lru_pages call ?
> IMHO, If it call isolate_lru_pages with "zone->inactive_list", It can
> be sure that it is not PG_active.

If we call isolate_lru_pages with mode = ISOLATE_BOTH, then it
can return both active and inactive pages and the calling function
has to be able to deal with both kinds of pages.

ISOLATE_BOTH is used when the kernel is trying to defragment memory,
for larger physically contiguous allocations.

--
All rights reversed.
--
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/