Re: [patch 07/21] SEQ replacement for anonymous pages

From: barrioskmc@gmail
Date: Mon Mar 03 2008 - 06:03:00 EST


Hi, Rik.

static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
struct scan_control *sc, int priority, int file)
{
- unsigned long pgmoved;
+ unsigned long pgmoved = 0;
int pgdeactivate = 0;
unsigned long pgscanned;
LIST_HEAD(l_hold); /* The pages which were snipped off */
@@ -1058,12 +1058,25 @@ static void shrink_active_list(unsigned
cond_resched();
page = lru_to_page(&l_hold);
list_del(&page->lru);
- if (page_referenced(page, 0, sc->mem_cgroup))
- lru = LRU_ACTIVE_ANON;
+ if (page_referenced(page, 0, sc->mem_cgroup)) {
+ if (file)
+ /* Referenced file pages stay active. */
+ lru = LRU_ACTIVE_ANON;
+ else
+ /* Anonymous pages always get deactivated. */
+ pgmoved++;
+ }
list_add(&page->lru, &list[lru]);
}

Why do you insert referenced page to LRU_ACTIVE_ANON ?
I have seen picture in your design document (http://linux-mm.org/PageReplacementDesign)
If I understand your point well, page referenced is inserted to LRU_ACTIVE_FILE.

What am I missing in your point?

Thanks, barrios
--
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/