* Q: shrink_cache() vs release_pages()
@ 2005-01-13 17:21 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2005-01-13 17:21 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-13 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-13 17:21 Q: shrink_cache() vs release_pages() Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®