Messages in this thread | | | Date | Thu, 13 Jan 2005 20:21:53 +0300 | From | Oleg Nesterov <> | Subject | Q: shrink_cache() vs release_pages() |
| |
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |