diff for duplicates of <20090820123206.GA9770@localhost> diff --git a/a/1.txt b/N1/1.txt index 723c1eb..055afcd 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -10,7 +10,7 @@ On Thu, Aug 20, 2009 at 08:13:59PM +0800, Minchan Kim wrote: > >> >> > >> >> > For mem_cgroup, shrink_zone() may call shrink_list() with nr_to_scan=1, > >> >> > in which case shrink_list() _still_ calls isolate_pages() with the much -> >> >> > larger SWAP_CLUSTER_MAX. It effectively scales up the inactive list +> >> >> > larger SWAP_CLUSTER_MAX. A It effectively scales up the inactive list > >> >> > scan rate by up to 32 times. > >> >> > > >> >> > For example, with 16k inactive pages and DEF_PRIORITY=12, (16k >> 12)=4. @@ -53,7 +53,7 @@ On Thu, Aug 20, 2009 at 08:13:59PM +0800, Minchan Kim wrote: > >> > > >> > For mem_cgroup, shrink_zone() may call shrink_list() with nr_to_scan=1, > >> > in which case shrink_list() _still_ calls isolate_pages() with the much -> >> > larger SWAP_CLUSTER_MAX. It effectively scales up the inactive list +> >> > larger SWAP_CLUSTER_MAX. A It effectively scales up the inactive list > >> > scan rate by up to 32 times. > >> > >> Yes. It can scan 32 times pages in only inactive list, not active list. @@ -61,8 +61,8 @@ On Thu, Aug 20, 2009 at 08:13:59PM +0800, Minchan Kim wrote: > > Yes and no ;) > > > > inactive anon list over scanned => inactive_anon_is_low() == TRUE -> > => shrink_active_list() -> > => active anon list over scanned +> > A A A A A A A A A A A A A A A A => shrink_active_list() +> > A A A A A A A A A A A A A A A A => active anon list over scanned > > Why inactive anon list is overscanned in case mem_cgroup ? > @@ -97,16 +97,16 @@ So the anon lists are over scanned compared to the active file list. > > > So the end result may be > > -> > - anon inactive => over scanned -> > - anon active => over scanned (maybe not as much) -> > - file inactive => over scanned -> > - file active => under scanned (relatively) +> > - anon inactive A => over scanned +> > - anon active A A => over scanned (maybe not as much) +> > - file inactive A => over scanned +> > - file active A A => under scanned (relatively) > > > >> > For example, with 16k inactive pages and DEF_PRIORITY=12, (16k >> 12)=4. > >> > So when shrink_zone() expects to scan 4 pages in the active/inactive > >> > list, it will be scanned SWAP_CLUSTER_MAX=32 pages in effect. > >> -> >> Active list scan would be scanned in 4, inactive list is 32. +> >> Active list scan would be scanned in 4, A inactive list A is 32. > > > > Exactly. > > @@ -131,9 +131,9 @@ So the anon lists are over scanned compared to the active file list. > > Sorry for the confusion. The above paragraph originates from Balbir's > > concern: > > -> > This might be a concern (although not a big ATM), since we can't -> > afford to miss limits by much. If a cgroup is near its limit and we -> > drop scanning it. We'll have to work out what this means for the end +> > A A A A This might be a concern (although not a big ATM), since we can't +> > A A A A afford to miss limits by much. If a cgroup is near its limit and we +> > A A A A drop scanning it. We'll have to work out what this means for the end > > Why does mem_cgroup drops scanning ? @@ -153,8 +153,8 @@ Sorry, I was explaining a null issue indeed. I'd better just remove that paragra Thanks, Fengguang -> > user. May be more fundamental look through is required at the priority -> > based logic of exposing how much to scan, I don't know. +> > A A A A user. May be more fundamental look through is required at the priority +> > A A A A based logic of exposing how much to scan, I don't know. > > > > Thanks, > > Fengguang @@ -169,100 +169,100 @@ Fengguang > >> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > >> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> > >> > --- -> >> > include/linux/mmzone.h | 6 +++++- -> >> > mm/page_alloc.c | 2 +- -> >> > mm/vmscan.c | 20 +++++++++++--------- -> >> > 3 files changed, 17 insertions(+), 11 deletions(-) +> >> > A include/linux/mmzone.h | A A 6 +++++- +> >> > A mm/page_alloc.c A A A A | A A 2 +- +> >> > A mm/vmscan.c A A A A A A | A 20 +++++++++++--------- +> >> > A 3 files changed, 17 insertions(+), 11 deletions(-) > >> > -> >> > --- linux.orig/include/linux/mmzone.h 2009-07-30 10:45:15.000000000 +0800 -> >> > +++ linux/include/linux/mmzone.h 2009-08-20 11:51:08.000000000 +0800 +> >> > --- linux.orig/include/linux/mmzone.h A 2009-07-30 10:45:15.000000000 +0800 +> >> > +++ linux/include/linux/mmzone.h A A A A 2009-08-20 11:51:08.000000000 +0800 > >> > @@ -269,6 +269,11 @@ struct zone_reclaim_stat { -> >> > */ -> >> > unsigned long recent_rotated[2]; -> >> > unsigned long recent_scanned[2]; +> >> > A A A A */ +> >> > A A A A unsigned long A A A A A recent_rotated[2]; +> >> > A A A A unsigned long A A A A A recent_scanned[2]; > >> > + -> >> > + /* -> >> > + * accumulated for batching -> >> > + */ -> >> > + unsigned long nr_saved_scan[NR_LRU_LISTS]; -> >> > }; +> >> > + A A A /* +> >> > + A A A A * accumulated for batching +> >> > + A A A A */ +> >> > + A A A unsigned long A A A A A nr_saved_scan[NR_LRU_LISTS]; +> >> > A }; > >> > -> >> > struct zone { +> >> > A struct zone { > >> > @@ -323,7 +328,6 @@ struct zone { -> >> > spinlock_t lru_lock; -> >> > struct zone_lru { -> >> > struct list_head list; -> >> > - unsigned long nr_saved_scan; /* accumulated for batching */ -> >> > } lru[NR_LRU_LISTS]; +> >> > A A A A spinlock_t A A A A A A A lru_lock; +> >> > A A A A struct zone_lru { +> >> > A A A A A A A A struct list_head list; +> >> > - A A A A A A A unsigned long nr_saved_scan; A A /* accumulated for batching */ +> >> > A A A A } lru[NR_LRU_LISTS]; > >> > -> >> > struct zone_reclaim_stat reclaim_stat; -> >> > --- linux.orig/mm/vmscan.c 2009-08-20 11:48:46.000000000 +0800 -> >> > +++ linux/mm/vmscan.c 2009-08-20 12:00:55.000000000 +0800 +> >> > A A A A struct zone_reclaim_stat reclaim_stat; +> >> > --- linux.orig/mm/vmscan.c A A A 2009-08-20 11:48:46.000000000 +0800 +> >> > +++ linux/mm/vmscan.c A 2009-08-20 12:00:55.000000000 +0800 > >> > @@ -1521,6 +1521,7 @@ static void shrink_zone(int priority, st -> >> > enum lru_list l; -> >> > unsigned long nr_reclaimed = sc->nr_reclaimed; -> >> > unsigned long swap_cluster_max = sc->swap_cluster_max; -> >> > + struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); -> >> > int noswap = 0; +> >> > A A A A enum lru_list l; +> >> > A A A A unsigned long nr_reclaimed = sc->nr_reclaimed; +> >> > A A A A unsigned long swap_cluster_max = sc->swap_cluster_max; +> >> > + A A A struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); +> >> > A A A A int noswap = 0; > >> > -> >> > /* If we have no swap space, do not bother scanning anon pages. */ +> >> > A A A A /* If we have no swap space, do not bother scanning anon pages. */ > >> > @@ -1540,12 +1541,9 @@ static void shrink_zone(int priority, st -> >> > scan >>= priority; -> >> > scan = (scan * percent[file]) / 100; -> >> > } -> >> > - if (scanning_global_lru(sc)) -> >> > - nr[l] = nr_scan_try_batch(scan, -> >> > - &zone->lru[l].nr_saved_scan, -> >> > - swap_cluster_max); -> >> > - else -> >> > - nr[l] = scan; -> >> > + nr[l] = nr_scan_try_batch(scan, -> >> > + &reclaim_stat->nr_saved_scan[l], -> >> > + swap_cluster_max); -> >> > } +> >> > A A A A A A A A A A A A scan >>= priority; +> >> > A A A A A A A A A A A A scan = (scan * percent[file]) / 100; +> >> > A A A A A A A A } +> >> > - A A A A A A A if (scanning_global_lru(sc)) +> >> > - A A A A A A A A A A A nr[l] = nr_scan_try_batch(scan, +> >> > - A A A A A A A A A A A A A A A A A A A A A A A A &zone->lru[l].nr_saved_scan, +> >> > - A A A A A A A A A A A A A A A A A A A A A A A A swap_cluster_max); +> >> > - A A A A A A A else +> >> > - A A A A A A A A A A A nr[l] = scan; +> >> > + A A A A A A A nr[l] = nr_scan_try_batch(scan, +> >> > + A A A A A A A A A A A A A A A A A A A A &reclaim_stat->nr_saved_scan[l], +> >> > + A A A A A A A A A A A A A A A A A A A A swap_cluster_max); +> >> > A A A A } > >> > -> >> > while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || +> >> > A A A A while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || > >> > @@ -2128,6 +2126,7 @@ static void shrink_all_zones(unsigned lo -> >> > { -> >> > struct zone *zone; -> >> > unsigned long nr_reclaimed = 0; -> >> > + struct zone_reclaim_stat *reclaim_stat; +> >> > A { +> >> > A A A A struct zone *zone; +> >> > A A A A unsigned long nr_reclaimed = 0; +> >> > + A A A struct zone_reclaim_stat *reclaim_stat; > >> > -> >> > for_each_populated_zone(zone) { -> >> > enum lru_list l; +> >> > A A A A for_each_populated_zone(zone) { +> >> > A A A A A A A A enum lru_list l; > >> > @@ -2144,11 +2143,14 @@ static void shrink_all_zones(unsigned lo -> >> > l == LRU_ACTIVE_FILE)) -> >> > continue; +> >> > A A A A A A A A A A A A A A A A A A A A A A A A l == LRU_ACTIVE_FILE)) +> >> > A A A A A A A A A A A A A A A A continue; > >> > -> >> > - zone->lru[l].nr_saved_scan += (lru_pages >> prio) + 1; -> >> > - if (zone->lru[l].nr_saved_scan >= nr_pages || pass > 3) { -> >> > + reclaim_stat = get_reclaim_stat(zone, sc); -> >> > + reclaim_stat->nr_saved_scan[l] += -> >> > + (lru_pages >> prio) + 1; -> >> > + if (reclaim_stat->nr_saved_scan[l] -> >> > + >= nr_pages || pass > 3) { -> >> > unsigned long nr_to_scan; +> >> > - A A A A A A A A A A A zone->lru[l].nr_saved_scan += (lru_pages >> prio) + 1; +> >> > - A A A A A A A A A A A if (zone->lru[l].nr_saved_scan >= nr_pages || pass > 3) { +> >> > + A A A A A A A A A A A reclaim_stat = get_reclaim_stat(zone, sc); +> >> > + A A A A A A A A A A A reclaim_stat->nr_saved_scan[l] += +> >> > + A A A A A A A A A A A A A A A A A A A A A A A (lru_pages >> prio) + 1; +> >> > + A A A A A A A A A A A if (reclaim_stat->nr_saved_scan[l] +> >> > + A A A A A A A A A A A A A A A A A A A A A A A >= nr_pages || pass > 3) { +> >> > A A A A A A A A A A A A A A A A unsigned long nr_to_scan; > >> > -> >> > - zone->lru[l].nr_saved_scan = 0; -> >> > + reclaim_stat->nr_saved_scan[l] = 0; -> >> > nr_to_scan = min(nr_pages, lru_pages); -> >> > nr_reclaimed += shrink_list(l, nr_to_scan, zone, -> >> > sc, prio); -> >> > --- linux.orig/mm/page_alloc.c 2009-08-20 11:57:54.000000000 +0800 -> >> > +++ linux/mm/page_alloc.c 2009-08-20 11:58:39.000000000 +0800 +> >> > - A A A A A A A A A A A A A A A zone->lru[l].nr_saved_scan = 0; +> >> > + A A A A A A A A A A A A A A A reclaim_stat->nr_saved_scan[l] = 0; +> >> > A A A A A A A A A A A A A A A A nr_to_scan = min(nr_pages, lru_pages); +> >> > A A A A A A A A A A A A A A A A nr_reclaimed += shrink_list(l, nr_to_scan, zone, +> >> > A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A sc, prio); +> >> > --- linux.orig/mm/page_alloc.c A 2009-08-20 11:57:54.000000000 +0800 +> >> > +++ linux/mm/page_alloc.c A A A 2009-08-20 11:58:39.000000000 +0800 > >> > @@ -3716,7 +3716,7 @@ static void __paginginit free_area_init_ -> >> > zone_pcp_init(zone); -> >> > for_each_lru(l) { -> >> > INIT_LIST_HEAD(&zone->lru[l].list); -> >> > - zone->lru[l].nr_saved_scan = 0; -> >> > + zone->reclaim_stat.nr_saved_scan[l] = 0; -> >> > } -> >> > zone->reclaim_stat.recent_rotated[0] = 0; -> >> > zone->reclaim_stat.recent_rotated[1] = 0; +> >> > A A A A A A A A zone_pcp_init(zone); +> >> > A A A A A A A A for_each_lru(l) { +> >> > A A A A A A A A A A A A INIT_LIST_HEAD(&zone->lru[l].list); +> >> > - A A A A A A A A A A A zone->lru[l].nr_saved_scan = 0; +> >> > + A A A A A A A A A A A zone->reclaim_stat.nr_saved_scan[l] = 0; +> >> > A A A A A A A A } +> >> > A A A A A A A A zone->reclaim_stat.recent_rotated[0] = 0; +> >> > A A A A A A A A zone->reclaim_stat.recent_rotated[1] = 0; > >> > > >> > -- > >> > To unsubscribe, send a message with 'unsubscribe linux-mm' in -> >> > the body to majordomo@kvack.org. For more info on Linux MM, +> >> > the body to majordomo@kvack.org. A For more info on Linux MM, > >> > see: http://www.linux-mm.org/ . > >> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> > >> > @@ -279,3 +279,9 @@ Fengguang > -- > Kind regards, > Minchan Kim + +-- +To unsubscribe, send a message with 'unsubscribe linux-mm' in +the body to majordomo@kvack.org. For more info on Linux MM, +see: http://www.linux-mm.org/ . +Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index 4206bc1..4c116ac 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -40,7 +40,7 @@ "> >> >>\n" "> >> >> > For mem_cgroup, shrink_zone() may call shrink_list() with nr_to_scan=1,\n" "> >> >> > in which case shrink_list() _still_ calls isolate_pages() with the much\n" - "> >> >> > larger SWAP_CLUSTER_MAX. \302\240It effectively scales up the inactive list\n" + "> >> >> > larger SWAP_CLUSTER_MAX. A It effectively scales up the inactive list\n" "> >> >> > scan rate by up to 32 times.\n" "> >> >> >\n" "> >> >> > For example, with 16k inactive pages and DEF_PRIORITY=12, (16k >> 12)=4.\n" @@ -83,7 +83,7 @@ "> >> >\n" "> >> > For mem_cgroup, shrink_zone() may call shrink_list() with nr_to_scan=1,\n" "> >> > in which case shrink_list() _still_ calls isolate_pages() with the much\n" - "> >> > larger SWAP_CLUSTER_MAX. \302\240It effectively scales up the inactive list\n" + "> >> > larger SWAP_CLUSTER_MAX. A It effectively scales up the inactive list\n" "> >> > scan rate by up to 32 times.\n" "> >>\n" "> >> Yes. It can scan 32 times pages in only inactive list, not active list.\n" @@ -91,8 +91,8 @@ "> > Yes and no ;)\n" "> >\n" "> > inactive anon list over scanned => inactive_anon_is_low() == TRUE\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240=> shrink_active_list()\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240=> active anon list over scanned\n" + "> > A A A A A A A A A A A A A A A A => shrink_active_list()\n" + "> > A A A A A A A A A A A A A A A A => active anon list over scanned\n" "> \n" "> Why inactive anon list is overscanned in case mem_cgroup ?\n" "> \n" @@ -127,16 +127,16 @@ "> \n" "> > So the end result may be\n" "> >\n" - "> > - anon inactive \302\240=> over scanned\n" - "> > - anon active \302\240 \302\240=> over scanned (maybe not as much)\n" - "> > - file inactive \302\240=> over scanned\n" - "> > - file active \302\240 \302\240=> under scanned (relatively)\n" + "> > - anon inactive A => over scanned\n" + "> > - anon active A A => over scanned (maybe not as much)\n" + "> > - file inactive A => over scanned\n" + "> > - file active A A => under scanned (relatively)\n" "> >\n" "> >> > For example, with 16k inactive pages and DEF_PRIORITY=12, (16k >> 12)=4.\n" "> >> > So when shrink_zone() expects to scan 4 pages in the active/inactive\n" "> >> > list, it will be scanned SWAP_CLUSTER_MAX=32 pages in effect.\n" "> >>\n" - "> >> Active list scan would be scanned in 4, \302\240inactive list \302\240is 32.\n" + "> >> Active list scan would be scanned in 4, A inactive list A is 32.\n" "> >\n" "> > Exactly.\n" "> >\n" @@ -161,9 +161,9 @@ "> > Sorry for the confusion. The above paragraph originates from Balbir's\n" "> > concern:\n" "> >\n" - "> > \302\240 \302\240 \302\240 \302\240This might be a concern (although not a big ATM), since we can't\n" - "> > \302\240 \302\240 \302\240 \302\240afford to miss limits by much. If a cgroup is near its limit and we\n" - "> > \302\240 \302\240 \302\240 \302\240drop scanning it. We'll have to work out what this means for the end\n" + "> > A A A A This might be a concern (although not a big ATM), since we can't\n" + "> > A A A A afford to miss limits by much. If a cgroup is near its limit and we\n" + "> > A A A A drop scanning it. We'll have to work out what this means for the end\n" "> \n" "> Why does mem_cgroup drops scanning ?\n" "\n" @@ -183,8 +183,8 @@ "Thanks,\n" "Fengguang\n" "\n" - "> > \302\240 \302\240 \302\240 \302\240user. May be more fundamental look through is required at the priority\n" - "> > \302\240 \302\240 \302\240 \302\240based logic of exposing how much to scan, I don't know.\n" + "> > A A A A user. May be more fundamental look through is required at the priority\n" + "> > A A A A based logic of exposing how much to scan, I don't know.\n" "> >\n" "> > Thanks,\n" "> > Fengguang\n" @@ -199,100 +199,100 @@ "> >> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\n" "> >> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>\n" "> >> > ---\n" - "> >> > \302\240include/linux/mmzone.h | \302\240 \302\2406 +++++-\n" - "> >> > \302\240mm/page_alloc.c \302\240 \302\240 \302\240 \302\240| \302\240 \302\2402 +-\n" - "> >> > \302\240mm/vmscan.c \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| \302\240 20 +++++++++++---------\n" - "> >> > \302\2403 files changed, 17 insertions(+), 11 deletions(-)\n" + "> >> > A include/linux/mmzone.h | A A 6 +++++-\n" + "> >> > A mm/page_alloc.c A A A A | A A 2 +-\n" + "> >> > A mm/vmscan.c A A A A A A | A 20 +++++++++++---------\n" + "> >> > A 3 files changed, 17 insertions(+), 11 deletions(-)\n" "> >> >\n" - "> >> > --- linux.orig/include/linux/mmzone.h \302\240 2009-07-30 10:45:15.000000000 +0800\n" - "> >> > +++ linux/include/linux/mmzone.h \302\240 \302\240 \302\240 \302\2402009-08-20 11:51:08.000000000 +0800\n" + "> >> > --- linux.orig/include/linux/mmzone.h A 2009-07-30 10:45:15.000000000 +0800\n" + "> >> > +++ linux/include/linux/mmzone.h A A A A 2009-08-20 11:51:08.000000000 +0800\n" "> >> > @@ -269,6 +269,11 @@ struct zone_reclaim_stat {\n" - "> >> > \302\240 \302\240 \302\240 \302\240 */\n" - "> >> > \302\240 \302\240 \302\240 \302\240unsigned long \302\240 \302\240 \302\240 \302\240 \302\240 recent_rotated[2];\n" - "> >> > \302\240 \302\240 \302\240 \302\240unsigned long \302\240 \302\240 \302\240 \302\240 \302\240 recent_scanned[2];\n" + "> >> > A A A A */\n" + "> >> > A A A A unsigned long A A A A A recent_rotated[2];\n" + "> >> > A A A A unsigned long A A A A A recent_scanned[2];\n" "> >> > +\n" - "> >> > + \302\240 \302\240 \302\240 /*\n" - "> >> > + \302\240 \302\240 \302\240 \302\240* accumulated for batching\n" - "> >> > + \302\240 \302\240 \302\240 \302\240*/\n" - "> >> > + \302\240 \302\240 \302\240 unsigned long \302\240 \302\240 \302\240 \302\240 \302\240 nr_saved_scan[NR_LRU_LISTS];\n" - "> >> > \302\240};\n" + "> >> > + A A A /*\n" + "> >> > + A A A A * accumulated for batching\n" + "> >> > + A A A A */\n" + "> >> > + A A A unsigned long A A A A A nr_saved_scan[NR_LRU_LISTS];\n" + "> >> > A };\n" "> >> >\n" - "> >> > \302\240struct zone {\n" + "> >> > A struct zone {\n" "> >> > @@ -323,7 +328,6 @@ struct zone {\n" - "> >> > \302\240 \302\240 \302\240 \302\240spinlock_t \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240lru_lock;\n" - "> >> > \302\240 \302\240 \302\240 \302\240struct zone_lru {\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240struct list_head list;\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 unsigned long nr_saved_scan; \302\240 \302\240/* accumulated for batching */\n" - "> >> > \302\240 \302\240 \302\240 \302\240} lru[NR_LRU_LISTS];\n" + "> >> > A A A A spinlock_t A A A A A A A lru_lock;\n" + "> >> > A A A A struct zone_lru {\n" + "> >> > A A A A A A A A struct list_head list;\n" + "> >> > - A A A A A A A unsigned long nr_saved_scan; A A /* accumulated for batching */\n" + "> >> > A A A A } lru[NR_LRU_LISTS];\n" "> >> >\n" - "> >> > \302\240 \302\240 \302\240 \302\240struct zone_reclaim_stat reclaim_stat;\n" - "> >> > --- linux.orig/mm/vmscan.c \302\240 \302\240 \302\2402009-08-20 11:48:46.000000000 +0800\n" - "> >> > +++ linux/mm/vmscan.c \302\240 2009-08-20 12:00:55.000000000 +0800\n" + "> >> > A A A A struct zone_reclaim_stat reclaim_stat;\n" + "> >> > --- linux.orig/mm/vmscan.c A A A 2009-08-20 11:48:46.000000000 +0800\n" + "> >> > +++ linux/mm/vmscan.c A 2009-08-20 12:00:55.000000000 +0800\n" "> >> > @@ -1521,6 +1521,7 @@ static void shrink_zone(int priority, st\n" - "> >> > \302\240 \302\240 \302\240 \302\240enum lru_list l;\n" - "> >> > \302\240 \302\240 \302\240 \302\240unsigned long nr_reclaimed = sc->nr_reclaimed;\n" - "> >> > \302\240 \302\240 \302\240 \302\240unsigned long swap_cluster_max = sc->swap_cluster_max;\n" - "> >> > + \302\240 \302\240 \302\240 struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);\n" - "> >> > \302\240 \302\240 \302\240 \302\240int noswap = 0;\n" + "> >> > A A A A enum lru_list l;\n" + "> >> > A A A A unsigned long nr_reclaimed = sc->nr_reclaimed;\n" + "> >> > A A A A unsigned long swap_cluster_max = sc->swap_cluster_max;\n" + "> >> > + A A A struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);\n" + "> >> > A A A A int noswap = 0;\n" "> >> >\n" - "> >> > \302\240 \302\240 \302\240 \302\240/* If we have no swap space, do not bother scanning anon pages. */\n" + "> >> > A A A A /* If we have no swap space, do not bother scanning anon pages. */\n" "> >> > @@ -1540,12 +1541,9 @@ static void shrink_zone(int priority, st\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240scan >>= priority;\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240scan = (scan * percent[file]) / 100;\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240}\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (scanning_global_lru(sc))\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 nr[l] = nr_scan_try_batch(scan,\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 &zone->lru[l].nr_saved_scan,\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 swap_cluster_max);\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 nr[l] = scan;\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 nr[l] = nr_scan_try_batch(scan,\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 &reclaim_stat->nr_saved_scan[l],\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 swap_cluster_max);\n" - "> >> > \302\240 \302\240 \302\240 \302\240}\n" + "> >> > A A A A A A A A A A A A scan >>= priority;\n" + "> >> > A A A A A A A A A A A A scan = (scan * percent[file]) / 100;\n" + "> >> > A A A A A A A A }\n" + "> >> > - A A A A A A A if (scanning_global_lru(sc))\n" + "> >> > - A A A A A A A A A A A nr[l] = nr_scan_try_batch(scan,\n" + "> >> > - A A A A A A A A A A A A A A A A A A A A A A A A &zone->lru[l].nr_saved_scan,\n" + "> >> > - A A A A A A A A A A A A A A A A A A A A A A A A swap_cluster_max);\n" + "> >> > - A A A A A A A else\n" + "> >> > - A A A A A A A A A A A nr[l] = scan;\n" + "> >> > + A A A A A A A nr[l] = nr_scan_try_batch(scan,\n" + "> >> > + A A A A A A A A A A A A A A A A A A A A &reclaim_stat->nr_saved_scan[l],\n" + "> >> > + A A A A A A A A A A A A A A A A A A A A swap_cluster_max);\n" + "> >> > A A A A }\n" "> >> >\n" - "> >> > \302\240 \302\240 \302\240 \302\240while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] ||\n" + "> >> > A A A A while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] ||\n" "> >> > @@ -2128,6 +2126,7 @@ static void shrink_all_zones(unsigned lo\n" - "> >> > \302\240{\n" - "> >> > \302\240 \302\240 \302\240 \302\240struct zone *zone;\n" - "> >> > \302\240 \302\240 \302\240 \302\240unsigned long nr_reclaimed = 0;\n" - "> >> > + \302\240 \302\240 \302\240 struct zone_reclaim_stat *reclaim_stat;\n" + "> >> > A {\n" + "> >> > A A A A struct zone *zone;\n" + "> >> > A A A A unsigned long nr_reclaimed = 0;\n" + "> >> > + A A A struct zone_reclaim_stat *reclaim_stat;\n" "> >> >\n" - "> >> > \302\240 \302\240 \302\240 \302\240for_each_populated_zone(zone) {\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240enum lru_list l;\n" + "> >> > A A A A for_each_populated_zone(zone) {\n" + "> >> > A A A A A A A A enum lru_list l;\n" "> >> > @@ -2144,11 +2143,14 @@ static void shrink_all_zones(unsigned lo\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240l == LRU_ACTIVE_FILE))\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240continue;\n" + "> >> > A A A A A A A A A A A A A A A A A A A A A A A A l == LRU_ACTIVE_FILE))\n" + "> >> > A A A A A A A A A A A A A A A A continue;\n" "> >> >\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 zone->lru[l].nr_saved_scan += (lru_pages >> prio) + 1;\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (zone->lru[l].nr_saved_scan >= nr_pages || pass > 3) {\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 reclaim_stat = get_reclaim_stat(zone, sc);\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 reclaim_stat->nr_saved_scan[l] +=\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 (lru_pages >> prio) + 1;\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (reclaim_stat->nr_saved_scan[l]\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 >= nr_pages || pass > 3) {\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240unsigned long nr_to_scan;\n" + "> >> > - A A A A A A A A A A A zone->lru[l].nr_saved_scan += (lru_pages >> prio) + 1;\n" + "> >> > - A A A A A A A A A A A if (zone->lru[l].nr_saved_scan >= nr_pages || pass > 3) {\n" + "> >> > + A A A A A A A A A A A reclaim_stat = get_reclaim_stat(zone, sc);\n" + "> >> > + A A A A A A A A A A A reclaim_stat->nr_saved_scan[l] +=\n" + "> >> > + A A A A A A A A A A A A A A A A A A A A A A A (lru_pages >> prio) + 1;\n" + "> >> > + A A A A A A A A A A A if (reclaim_stat->nr_saved_scan[l]\n" + "> >> > + A A A A A A A A A A A A A A A A A A A A A A A >= nr_pages || pass > 3) {\n" + "> >> > A A A A A A A A A A A A A A A A unsigned long nr_to_scan;\n" "> >> >\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 zone->lru[l].nr_saved_scan = 0;\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 reclaim_stat->nr_saved_scan[l] = 0;\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240nr_to_scan = min(nr_pages, lru_pages);\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240nr_reclaimed += shrink_list(l, nr_to_scan, zone,\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240sc, prio);\n" - "> >> > --- linux.orig/mm/page_alloc.c \302\2402009-08-20 11:57:54.000000000 +0800\n" - "> >> > +++ linux/mm/page_alloc.c \302\240 \302\240 \302\240 2009-08-20 11:58:39.000000000 +0800\n" + "> >> > - A A A A A A A A A A A A A A A zone->lru[l].nr_saved_scan = 0;\n" + "> >> > + A A A A A A A A A A A A A A A reclaim_stat->nr_saved_scan[l] = 0;\n" + "> >> > A A A A A A A A A A A A A A A A nr_to_scan = min(nr_pages, lru_pages);\n" + "> >> > A A A A A A A A A A A A A A A A nr_reclaimed += shrink_list(l, nr_to_scan, zone,\n" + "> >> > A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A sc, prio);\n" + "> >> > --- linux.orig/mm/page_alloc.c A 2009-08-20 11:57:54.000000000 +0800\n" + "> >> > +++ linux/mm/page_alloc.c A A A 2009-08-20 11:58:39.000000000 +0800\n" "> >> > @@ -3716,7 +3716,7 @@ static void __paginginit free_area_init_\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240zone_pcp_init(zone);\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240for_each_lru(l) {\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240INIT_LIST_HEAD(&zone->lru[l].list);\n" - "> >> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 zone->lru[l].nr_saved_scan = 0;\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 zone->reclaim_stat.nr_saved_scan[l] = 0;\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240}\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240zone->reclaim_stat.recent_rotated[0] = 0;\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240zone->reclaim_stat.recent_rotated[1] = 0;\n" + "> >> > A A A A A A A A zone_pcp_init(zone);\n" + "> >> > A A A A A A A A for_each_lru(l) {\n" + "> >> > A A A A A A A A A A A A INIT_LIST_HEAD(&zone->lru[l].list);\n" + "> >> > - A A A A A A A A A A A zone->lru[l].nr_saved_scan = 0;\n" + "> >> > + A A A A A A A A A A A zone->reclaim_stat.nr_saved_scan[l] = 0;\n" + "> >> > A A A A A A A A }\n" + "> >> > A A A A A A A A zone->reclaim_stat.recent_rotated[0] = 0;\n" + "> >> > A A A A A A A A zone->reclaim_stat.recent_rotated[1] = 0;\n" "> >> >\n" "> >> > --\n" "> >> > To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "> >> > the body to majordomo@kvack.org. \302\240For more info on Linux MM,\n" + "> >> > the body to majordomo@kvack.org. A For more info on Linux MM,\n" "> >> > see: http://www.linux-mm.org/ .\n" "> >> > Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>\n" "> >> >\n" @@ -308,6 +308,12 @@ "> \n" "> -- \n" "> Kind regards,\n" - > Minchan Kim + "> Minchan Kim\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -62ce296c0678d40fed36edcbb01e6c3690711c6e6d990cf4951fd063ccac4f50 +a868023968f316703e43b7a7151fff6fe069ca410d4788fd040e5d3c57de6790
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.