Re: [PATCH -mm 07/16] second chance replacement for anonymous pages

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rik van Riel <riel@...>
Cc: <linux-kernel@...>, Andrew Morton <akpm@...>, Lee Schermerhorn <lee.schermerhorn@...>, Kosaki Motohiro <kosaki.motohiro@...>
Date: Wednesday, May 28, 2008 - 11:42 am

Rik van Riel wrote:

When all the patches applied, shrink_active_list() looks like:

   1135         pgmoved = sc->isolate_pages(nr_pages, &l_hold, &pgscanned, sc->order,
   1136                                         ISOLATE_ACTIVE, zone,
   1137                                         sc->mem_cgroup, 1, file);
     :
   1150         if (file)
   1151                 __mod_zone_page_state(zone, NR_ACTIVE_FILE, -pgmoved);
   1152         else
   1153                 __mod_zone_page_state(zone, NR_ACTIVE_ANON, -pgmoved);
   1154         spin_unlock_irq(&zone->lru_lock);
   1155 
   1156         while (!list_empty(&l_hold)) {
     :
   1166                 if (page_referenced(page, 0, sc->mem_cgroup) && file) {
   1167                         /* Referenced file pages stay active. */
   1168                         list_add(&page->lru, &l_active);
   1169                 } else {
   1170                         list_add(&page->lru, &l_inactive);
   1171                         if (!file)
   1172                                 /* Anonymous pages always get deactivated. */
   1173                                 pgmoved++;
     :
   1178                 }
   1179         }
   1180 
   1181         /*
   1182          * Count the referenced anon pages as rotated, to balance pageout
   1183          * scan pressure between file and anonymous pages in get_sacn_ratio.
   1184          */
   1185         if (!file)
   1186                 zone->recent_rotated_anon += pgmoved;

So, I wondered that there is no need to clear pgmoved before 1156 line.


Thanks,
Daisuke Nishimura.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH -mm 07/16] second chance replacement for anonymou..., Daisuke Nishimura, (Wed May 28, 1:36 am)
Re: [PATCH -mm 07/16] second chance replacement for anonymou..., Daisuke Nishimura, (Wed May 28, 11:42 am)