Re: [RFC] [PATCH] Include LRU in page count

From: Andrew Morton (akpm@zip.com.au)
Date: Sat Aug 31 2002 - 12:54:09 EST


Christian Ehrhardt wrote:
>
> ...
> Solution: Change the PageLRU bit inside the lock. Looks like
> lru_cache_add is the only place that doesn't hold the lru lock to
> change the LRU flag and it's probably not a good idea even without
> the patch.
>

2.4.20-pre already does that:

void lru_cache_add(struct page * page)
{
        if (!PageLRU(page)) {
                spin_lock(&pagemap_lru_lock);
                if (!TestSetPageLRU(page))
                        add_page_to_inactive_list(page);
                spin_unlock(&pagemap_lru_lock);
        }
}

there was an oopsing race with activate_page()...
-
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/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:33 EST