Q: shrink_cache() vs release_pages()
From: Oleg Nesterov
Date: Thu Jan 13 2005 - 11:23:37 EST
Hello.
shrink_cache:
if (get_page_testone(page)) {
__put_page(page);
SetPageLRU(page);
list_add(&page->lru, &zone->inactive_list);
continue;
}
Is it really necessary to re-add the page to inactive_list?
It seems to me that shrink_cache() can just do:
if (get_page_testone(page)) {
__put_page(page);
--zone->nr_inactive;
continue;
}
When the __page_cache_release (or whatever) takes zone->lru_lock
it must check PG_lru before del_page_from_lru().
The same question applies to refill_inactive_zone().
Thanks,
Oleg.
-
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/