lkml.org 
[lkml]   [2008]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [patch 07/21] SEQ replacement for anonymous pages
From
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

\
 
 \ /
  Last update: 2008-03-03 12:05    [W:0.217 / U:3.604 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site