linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: remove zone->prev_prioriy
@ 2009-02-10  9:42 KOSAKI Motohiro
  2009-02-10 10:42 ` Johannes Weiner
  2009-02-10 10:57 ` [PATCH] mm: remove zone->prev_prioriy MinChan Kim
  0 siblings, 2 replies; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-02-10  9:42 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki, LKML, linux-mm, Rik van Riel, Andrew Morton
  Cc: kosaki.motohiro


KAMEZAWA Hiroyuki sugessted to remove zone->prev_priority.
it's because Split-LRU VM doesn't use this parameter at all.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 include/linux/memcontrol.h |   27 -------------------------
 include/linux/mmzone.h     |   15 --------------
 mm/memcontrol.c            |   31 -----------------------------
 mm/page_alloc.c            |    2 -
 mm/vmscan.c                |   48 ++-------------------------------------------
 mm/vmstat.c                |    2 -
 6 files changed, 3 insertions(+), 122 deletions(-)

Index: b/mm/memcontrol.c
===================================================================
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -150,8 +150,6 @@ struct mem_cgroup {
 	*/
 	spinlock_t reclaim_param_lock;
 
-	int	prev_priority;	/* for recording reclaim priority */
-
 	/*
 	 * While reclaiming in a hiearchy, we cache the last child we
 	 * reclaimed from. Protected by hierarchy_mutex
@@ -464,35 +462,6 @@ int mem_cgroup_calc_mapped_ratio(struct 
 	return (int)((rss * 100L) / total);
 }
 
-/*
- * prev_priority control...this will be used in memory reclaim path.
- */
-int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
-{
-	int prev_priority;
-
-	spin_lock(&mem->reclaim_param_lock);
-	prev_priority = mem->prev_priority;
-	spin_unlock(&mem->reclaim_param_lock);
-
-	return prev_priority;
-}
-
-void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, int priority)
-{
-	spin_lock(&mem->reclaim_param_lock);
-	if (priority < mem->prev_priority)
-		mem->prev_priority = priority;
-	spin_unlock(&mem->reclaim_param_lock);
-}
-
-void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, int priority)
-{
-	spin_lock(&mem->reclaim_param_lock);
-	mem->prev_priority = priority;
-	spin_unlock(&mem->reclaim_param_lock);
-}
-
 static int calc_inactive_ratio(struct mem_cgroup *memcg, unsigned long *present_pages)
 {
 	unsigned long active;
Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1174,20 +1174,6 @@ done:
 }
 
 /*
- * We are about to scan this zone at a certain priority level.  If that priority
- * level is smaller (ie: more urgent) than the previous priority, then note
- * that priority level within the zone.  This is done so that when the next
- * process comes in to scan this zone, it will immediately start out at this
- * priority level rather than having to build up its own scanning priority.
- * Here, this priority affects only the reclaim-mapped threshold.
- */
-static inline void note_zone_scanning_priority(struct zone *zone, int priority)
-{
-	if (priority < zone->prev_priority)
-		zone->prev_priority = priority;
-}
-
-/*
  * This moves pages from the active list to the inactive list.
  *
  * We move them the other way if the page is referenced by one or more
@@ -1553,22 +1539,18 @@ static void shrink_zones(int priority, s
 		if (scanning_global_lru(sc)) {
 			if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
 				continue;
-			note_zone_scanning_priority(zone, priority);
 
 			if (zone_is_all_unreclaimable(zone) &&
 						priority != DEF_PRIORITY)
 				continue;	/* Let kswapd poll it */
-			sc->all_unreclaimable = 0;
+
 		} else {
 			/*
 			 * Ignore cpuset limitation here. We just want to reduce
 			 * # of used pages by us regardless of memory shortage.
 			 */
-			sc->all_unreclaimable = 0;
-			mem_cgroup_note_reclaim_priority(sc->mem_cgroup,
-							priority);
 		}
-
+		sc->all_unreclaimable = 0;
 		shrink_zone(priority, zone, sc);
 	}
 }
@@ -1676,11 +1658,8 @@ out:
 
 			if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
 				continue;
-
-			zone->prev_priority = priority;
 		}
-	} else
-		mem_cgroup_record_reclaim_priority(sc->mem_cgroup, priority);
+	}
 
 	delayacct_freepages_end();
 
@@ -1769,11 +1748,6 @@ static unsigned long balance_pgdat(pg_da
 		.mem_cgroup = NULL,
 		.isolate_pages = isolate_pages_global,
 	};
-	/*
-	 * temp_priority is used to remember the scanning priority at which
-	 * this zone was successfully refilled to free_pages == pages_high.
-	 */
-	int temp_priority[MAX_NR_ZONES];
 
 loop_again:
 	total_scanned = 0;
@@ -1781,9 +1755,6 @@ loop_again:
 	sc.may_writepage = !laptop_mode;
 	count_vm_event(PAGEOUTRUN);
 
-	for (i = 0; i < pgdat->nr_zones; i++)
-		temp_priority[i] = DEF_PRIORITY;
-
 	for (priority = DEF_PRIORITY; priority >= 0; priority--) {
 		int end_zone = 0;	/* Inclusive.  0 = ZONE_DMA */
 		unsigned long lru_pages = 0;
@@ -1854,9 +1825,7 @@ loop_again:
 			if (!zone_watermark_ok(zone, order, zone->pages_high,
 					       end_zone, 0))
 				all_zones_ok = 0;
-			temp_priority[i] = priority;
 			sc.nr_scanned = 0;
-			note_zone_scanning_priority(zone, priority);
 			/*
 			 * We put equal pressure on every zone, unless one
 			 * zone has way too many pages free already.
@@ -1903,16 +1872,6 @@ loop_again:
 			break;
 	}
 out:
-	/*
-	 * Note within each zone the priority level at which this zone was
-	 * brought into a happy state.  So that the next thread which scans this
-	 * zone will start out at that priority level.
-	 */
-	for (i = 0; i < pgdat->nr_zones; i++) {
-		struct zone *zone = pgdat->node_zones + i;
-
-		zone->prev_priority = temp_priority[i];
-	}
 	if (!all_zones_ok) {
 		cond_resched();
 
@@ -2321,7 +2280,6 @@ static int __zone_reclaim(struct zone *z
 		 */
 		priority = ZONE_RECLAIM_PRIORITY;
 		do {
-			note_zone_scanning_priority(zone, priority);
 			shrink_zone(priority, zone, &sc);
 			priority--;
 		} while (priority >= 0 && sc.nr_reclaimed < nr_pages);
Index: b/include/linux/mmzone.h
===================================================================
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -337,21 +337,6 @@ struct zone {
 	atomic_long_t		vm_stat[NR_VM_ZONE_STAT_ITEMS];
 
 	/*
-	 * prev_priority holds the scanning priority for this zone.  It is
-	 * defined as the scanning priority at which we achieved our reclaim
-	 * target at the previous try_to_free_pages() or balance_pgdat()
-	 * invokation.
-	 *
-	 * We use prev_priority as a measure of how much stress page reclaim is
-	 * under - it drives the swappiness decision: whether to unmap mapped
-	 * pages.
-	 *
-	 * Access to both this field is quite racy even on uniprocessor.  But
-	 * it is expected to average out OK.
-	 */
-	int prev_priority;
-
-	/*
 	 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
 	 * this zone's LRU.  Maintained by the pageout code.
 	 */
Index: b/mm/page_alloc.c
===================================================================
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3516,8 +3516,6 @@ static void __paginginit free_area_init_
 		zone_seqlock_init(zone);
 		zone->zone_pgdat = pgdat;
 
-		zone->prev_priority = DEF_PRIORITY;
-
 		zone_pcp_init(zone);
 		for_each_lru(l) {
 			INIT_LIST_HEAD(&zone->lru[l].list);
Index: b/mm/vmstat.c
===================================================================
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -775,11 +775,9 @@ static void zoneinfo_show_print(struct s
 	}
 	seq_printf(m,
 		   "\n  all_unreclaimable: %u"
-		   "\n  prev_priority:     %i"
 		   "\n  start_pfn:         %lu"
 		   "\n  inactive_ratio:    %u",
 			   zone_is_all_unreclaimable(zone),
-		   zone->prev_priority,
 		   zone->zone_start_pfn,
 		   zone->inactive_ratio);
 	seq_putc(m, '\n');
Index: b/include/linux/memcontrol.h
===================================================================
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -88,14 +88,7 @@ extern void mem_cgroup_end_migration(str
 /*
  * For memory reclaim.
  */
-extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
 extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
-
-extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
-extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
-							int priority);
-extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
-							int priority);
 int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
 unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
 				       struct zone *zone,
@@ -209,31 +202,11 @@ static inline void mem_cgroup_end_migrat
 {
 }
 
-static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem)
-{
-	return 0;
-}
-
 static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem)
 {
 	return 0;
 }
 
-static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
-{
-	return 0;
-}
-
-static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
-						int priority)
-{
-}
-
-static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
-						int priority)
-{
-}
-
 static inline bool mem_cgroup_disabled(void)
 {
 	return true;




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-10  9:42 [PATCH] mm: remove zone->prev_prioriy KOSAKI Motohiro
@ 2009-02-10 10:42 ` Johannes Weiner
  2009-02-10 10:50   ` KOSAKI Motohiro
  2009-02-10 10:57 ` [PATCH] mm: remove zone->prev_prioriy MinChan Kim
  1 sibling, 1 reply; 10+ messages in thread
From: Johannes Weiner @ 2009-02-10 10:42 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: KAMEZAWA Hiroyuki, LKML, linux-mm, Rik van Riel, Andrew Morton

On Tue, Feb 10, 2009 at 06:42:30PM +0900, KOSAKI Motohiro wrote:
> 
> KAMEZAWA Hiroyuki sugessted to remove zone->prev_priority.
> it's because Split-LRU VM doesn't use this parameter at all.
> 
> 
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  include/linux/memcontrol.h |   27 -------------------------
>  include/linux/mmzone.h     |   15 --------------
>  mm/memcontrol.c            |   31 -----------------------------
>  mm/page_alloc.c            |    2 -
>  mm/vmscan.c                |   48 ++-------------------------------------------
>  mm/vmstat.c                |    2 -
>  6 files changed, 3 insertions(+), 122 deletions(-)

> Index: b/include/linux/memcontrol.h
> ===================================================================
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -88,14 +88,7 @@ extern void mem_cgroup_end_migration(str
>  /*
>   * For memory reclaim.
>   */
> -extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);

This bit crept in from the next patch, I think.

>  extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
> -
> -extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
> -extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
> -							int priority);
> -extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
> -							int priority);
>  int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
>  unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
>  				       struct zone *zone,
> @@ -209,31 +202,11 @@ static inline void mem_cgroup_end_migrat
>  {
>  }
>  
> -static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem)
> -{
> -	return 0;
> -}
> -

:)

Looks good to me otherwise.

Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-10 10:42 ` Johannes Weiner
@ 2009-02-10 10:50   ` KOSAKI Motohiro
  2009-02-10 11:49     ` [PATCH] mm,memcg: remove zone->prev_prioriy take2 KOSAKI Motohiro
  0 siblings, 1 reply; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-02-10 10:50 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: kosaki.motohiro, KAMEZAWA Hiroyuki, LKML, linux-mm, Rik van Riel,
	Andrew Morton

> On Tue, Feb 10, 2009 at 06:42:30PM +0900, KOSAKI Motohiro wrote:
> > 
> > KAMEZAWA Hiroyuki sugessted to remove zone->prev_priority.
> > it's because Split-LRU VM doesn't use this parameter at all.
> > 
> > 
> > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > ---
> >  include/linux/memcontrol.h |   27 -------------------------
> >  include/linux/mmzone.h     |   15 --------------
> >  mm/memcontrol.c            |   31 -----------------------------
> >  mm/page_alloc.c            |    2 -
> >  mm/vmscan.c                |   48 ++-------------------------------------------
> >  mm/vmstat.c                |    2 -
> >  6 files changed, 3 insertions(+), 122 deletions(-)
> 
> > Index: b/include/linux/memcontrol.h
> > ===================================================================
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> > @@ -88,14 +88,7 @@ extern void mem_cgroup_end_migration(str
> >  /*
> >   * For memory reclaim.
> >   */
> > -extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
> 
> This bit crept in from the next patch, I think.

Grr.
I'll fix this soon.

Thanks for carefully reviewing! 




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-10  9:42 [PATCH] mm: remove zone->prev_prioriy KOSAKI Motohiro
  2009-02-10 10:42 ` Johannes Weiner
@ 2009-02-10 10:57 ` MinChan Kim
  2009-02-10 23:12   ` Andrew Morton
  1 sibling, 1 reply; 10+ messages in thread
From: MinChan Kim @ 2009-02-10 10:57 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: KAMEZAWA Hiroyuki, LKML, linux-mm, Rik van Riel, Andrew Morton

Hi, Kosaki-san.

As you know, prev_priority is used as a measure of how much stress page reclaim.
But now we doesn't need it due to split-lru's way.

I think it would be better to remain why prev_priority isn't needed any more
and how split-lru can replace prev_priority's role in changelog.

In future, it help mm newbies understand change history, I think.

On Tue, Feb 10, 2009 at 6:42 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>
> KAMEZAWA Hiroyuki sugessted to remove zone->prev_priority.
> it's because Split-LRU VM doesn't use this parameter at all.
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  include/linux/memcontrol.h |   27 -------------------------
>  include/linux/mmzone.h     |   15 --------------
>  mm/memcontrol.c            |   31 -----------------------------
>  mm/page_alloc.c            |    2 -
>  mm/vmscan.c                |   48 ++-------------------------------------------
>  mm/vmstat.c                |    2 -
>  6 files changed, 3 insertions(+), 122 deletions(-)
>
> Index: b/mm/memcontrol.c
> ===================================================================
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -150,8 +150,6 @@ struct mem_cgroup {
>        */
>        spinlock_t reclaim_param_lock;
>
> -       int     prev_priority;  /* for recording reclaim priority */
> -
>        /*
>         * While reclaiming in a hiearchy, we cache the last child we
>         * reclaimed from. Protected by hierarchy_mutex
> @@ -464,35 +462,6 @@ int mem_cgroup_calc_mapped_ratio(struct
>        return (int)((rss * 100L) / total);
>  }
>
> -/*
> - * prev_priority control...this will be used in memory reclaim path.
> - */
> -int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
> -{
> -       int prev_priority;
> -
> -       spin_lock(&mem->reclaim_param_lock);
> -       prev_priority = mem->prev_priority;
> -       spin_unlock(&mem->reclaim_param_lock);
> -
> -       return prev_priority;
> -}
> -
> -void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, int priority)
> -{
> -       spin_lock(&mem->reclaim_param_lock);
> -       if (priority < mem->prev_priority)
> -               mem->prev_priority = priority;
> -       spin_unlock(&mem->reclaim_param_lock);
> -}
> -
> -void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, int priority)
> -{
> -       spin_lock(&mem->reclaim_param_lock);
> -       mem->prev_priority = priority;
> -       spin_unlock(&mem->reclaim_param_lock);
> -}
> -
>  static int calc_inactive_ratio(struct mem_cgroup *memcg, unsigned long *present_pages)
>  {
>        unsigned long active;
> Index: b/mm/vmscan.c
> ===================================================================
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1174,20 +1174,6 @@ done:
>  }
>
>  /*
> - * We are about to scan this zone at a certain priority level.  If that priority
> - * level is smaller (ie: more urgent) than the previous priority, then note
> - * that priority level within the zone.  This is done so that when the next
> - * process comes in to scan this zone, it will immediately start out at this
> - * priority level rather than having to build up its own scanning priority.
> - * Here, this priority affects only the reclaim-mapped threshold.
> - */
> -static inline void note_zone_scanning_priority(struct zone *zone, int priority)
> -{
> -       if (priority < zone->prev_priority)
> -               zone->prev_priority = priority;
> -}
> -
> -/*
>  * This moves pages from the active list to the inactive list.
>  *
>  * We move them the other way if the page is referenced by one or more
> @@ -1553,22 +1539,18 @@ static void shrink_zones(int priority, s
>                if (scanning_global_lru(sc)) {
>                        if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
>                                continue;
> -                       note_zone_scanning_priority(zone, priority);
>
>                        if (zone_is_all_unreclaimable(zone) &&
>                                                priority != DEF_PRIORITY)
>                                continue;       /* Let kswapd poll it */
> -                       sc->all_unreclaimable = 0;
> +
>                } else {
>                        /*
>                         * Ignore cpuset limitation here. We just want to reduce
>                         * # of used pages by us regardless of memory shortage.
>                         */
> -                       sc->all_unreclaimable = 0;
> -                       mem_cgroup_note_reclaim_priority(sc->mem_cgroup,
> -                                                       priority);
>                }
> -
> +               sc->all_unreclaimable = 0;
>                shrink_zone(priority, zone, sc);
>        }
>  }
> @@ -1676,11 +1658,8 @@ out:
>
>                        if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
>                                continue;
> -
> -                       zone->prev_priority = priority;
>                }
> -       } else
> -               mem_cgroup_record_reclaim_priority(sc->mem_cgroup, priority);
> +       }
>
>        delayacct_freepages_end();
>
> @@ -1769,11 +1748,6 @@ static unsigned long balance_pgdat(pg_da
>                .mem_cgroup = NULL,
>                .isolate_pages = isolate_pages_global,
>        };
> -       /*
> -        * temp_priority is used to remember the scanning priority at which
> -        * this zone was successfully refilled to free_pages == pages_high.
> -        */
> -       int temp_priority[MAX_NR_ZONES];
>
>  loop_again:
>        total_scanned = 0;
> @@ -1781,9 +1755,6 @@ loop_again:
>        sc.may_writepage = !laptop_mode;
>        count_vm_event(PAGEOUTRUN);
>
> -       for (i = 0; i < pgdat->nr_zones; i++)
> -               temp_priority[i] = DEF_PRIORITY;
> -
>        for (priority = DEF_PRIORITY; priority >= 0; priority--) {
>                int end_zone = 0;       /* Inclusive.  0 = ZONE_DMA */
>                unsigned long lru_pages = 0;
> @@ -1854,9 +1825,7 @@ loop_again:
>                        if (!zone_watermark_ok(zone, order, zone->pages_high,
>                                               end_zone, 0))
>                                all_zones_ok = 0;
> -                       temp_priority[i] = priority;
>                        sc.nr_scanned = 0;
> -                       note_zone_scanning_priority(zone, priority);
>                        /*
>                         * We put equal pressure on every zone, unless one
>                         * zone has way too many pages free already.
> @@ -1903,16 +1872,6 @@ loop_again:
>                        break;
>        }
>  out:
> -       /*
> -        * Note within each zone the priority level at which this zone was
> -        * brought into a happy state.  So that the next thread which scans this
> -        * zone will start out at that priority level.
> -        */
> -       for (i = 0; i < pgdat->nr_zones; i++) {
> -               struct zone *zone = pgdat->node_zones + i;
> -
> -               zone->prev_priority = temp_priority[i];
> -       }
>        if (!all_zones_ok) {
>                cond_resched();
>
> @@ -2321,7 +2280,6 @@ static int __zone_reclaim(struct zone *z
>                 */
>                priority = ZONE_RECLAIM_PRIORITY;
>                do {
> -                       note_zone_scanning_priority(zone, priority);
>                        shrink_zone(priority, zone, &sc);
>                        priority--;
>                } while (priority >= 0 && sc.nr_reclaimed < nr_pages);
> Index: b/include/linux/mmzone.h
> ===================================================================
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -337,21 +337,6 @@ struct zone {
>        atomic_long_t           vm_stat[NR_VM_ZONE_STAT_ITEMS];
>
>        /*
> -        * prev_priority holds the scanning priority for this zone.  It is
> -        * defined as the scanning priority at which we achieved our reclaim
> -        * target at the previous try_to_free_pages() or balance_pgdat()
> -        * invokation.
> -        *
> -        * We use prev_priority as a measure of how much stress page reclaim is
> -        * under - it drives the swappiness decision: whether to unmap mapped
> -        * pages.
> -        *
> -        * Access to both this field is quite racy even on uniprocessor.  But
> -        * it is expected to average out OK.
> -        */
> -       int prev_priority;
> -
> -       /*
>         * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
>         * this zone's LRU.  Maintained by the pageout code.
>         */
> Index: b/mm/page_alloc.c
> ===================================================================
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3516,8 +3516,6 @@ static void __paginginit free_area_init_
>                zone_seqlock_init(zone);
>                zone->zone_pgdat = pgdat;
>
> -               zone->prev_priority = DEF_PRIORITY;
> -
>                zone_pcp_init(zone);
>                for_each_lru(l) {
>                        INIT_LIST_HEAD(&zone->lru[l].list);
> Index: b/mm/vmstat.c
> ===================================================================
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -775,11 +775,9 @@ static void zoneinfo_show_print(struct s
>        }
>        seq_printf(m,
>                   "\n  all_unreclaimable: %u"
> -                  "\n  prev_priority:     %i"
>                   "\n  start_pfn:         %lu"
>                   "\n  inactive_ratio:    %u",
>                           zone_is_all_unreclaimable(zone),
> -                  zone->prev_priority,
>                   zone->zone_start_pfn,
>                   zone->inactive_ratio);
>        seq_putc(m, '\n');
> Index: b/include/linux/memcontrol.h
> ===================================================================
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -88,14 +88,7 @@ extern void mem_cgroup_end_migration(str
>  /*
>  * For memory reclaim.
>  */
> -extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
>  extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
> -
> -extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
> -extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
> -                                                       int priority);
> -extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
> -                                                       int priority);
>  int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
>  unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
>                                       struct zone *zone,
> @@ -209,31 +202,11 @@ static inline void mem_cgroup_end_migrat
>  {
>  }
>
> -static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem)
> -{
> -       return 0;
> -}
> -
>  static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem)
>  {
>        return 0;
>  }
>
> -static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
> -{
> -       return 0;
> -}
> -
> -static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
> -                                               int priority)
> -{
> -}
> -
> -static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
> -                                               int priority)
> -{
> -}
> -
>  static inline bool mem_cgroup_disabled(void)
>  {
>        return true;
>
>
>
> --
> 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>
>



-- 
Kinds regards,
MinChan Kim

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] mm,memcg: remove zone->prev_prioriy take2
  2009-02-10 10:50   ` KOSAKI Motohiro
@ 2009-02-10 11:49     ` KOSAKI Motohiro
  0 siblings, 0 replies; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-02-10 11:49 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: kosaki.motohiro, KAMEZAWA Hiroyuki, LKML, linux-mm, Rik van Riel,
	Andrew Morton, Balbir Singh

> > > -extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
> > 
> > This bit crept in from the next patch, I think.
> 
> Grr.
> I'll fix this soon.
> 
> Thanks for carefully reviewing! 

Fixed.


==
Subject: [PATCH] mm,memcg: remove zone->prev_prioriy take2

KAMEZAWA Hiroyuki sugessted to remove zone->prev_priority.
it's because Split-LRU VM doesn't use this parameter at all.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
---
 include/linux/memcontrol.h |   21 ------------------
 include/linux/mmzone.h     |   15 -------------
 mm/memcontrol.c            |   31 ---------------------------
 mm/page_alloc.c            |    2 -
 mm/vmscan.c                |   51 +--------------------------------------------
 mm/vmstat.c                |    2 -
 6 files changed, 2 insertions(+), 120 deletions(-)

Index: b/mm/memcontrol.c
===================================================================
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -150,8 +150,6 @@ struct mem_cgroup {
 	*/
 	spinlock_t reclaim_param_lock;
 
-	int	prev_priority;	/* for recording reclaim priority */
-
 	/*
 	 * While reclaiming in a hiearchy, we cache the last child we
 	 * reclaimed from. Protected by hierarchy_mutex
@@ -464,35 +462,6 @@ int mem_cgroup_calc_mapped_ratio(struct 
 	return (int)((rss * 100L) / total);
 }
 
-/*
- * prev_priority control...this will be used in memory reclaim path.
- */
-int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
-{
-	int prev_priority;
-
-	spin_lock(&mem->reclaim_param_lock);
-	prev_priority = mem->prev_priority;
-	spin_unlock(&mem->reclaim_param_lock);
-
-	return prev_priority;
-}
-
-void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, int priority)
-{
-	spin_lock(&mem->reclaim_param_lock);
-	if (priority < mem->prev_priority)
-		mem->prev_priority = priority;
-	spin_unlock(&mem->reclaim_param_lock);
-}
-
-void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, int priority)
-{
-	spin_lock(&mem->reclaim_param_lock);
-	mem->prev_priority = priority;
-	spin_unlock(&mem->reclaim_param_lock);
-}
-
 static int calc_inactive_ratio(struct mem_cgroup *memcg, unsigned long *present_pages)
 {
 	unsigned long active;
Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1174,20 +1174,6 @@ done:
 }
 
 /*
- * We are about to scan this zone at a certain priority level.  If that priority
- * level is smaller (ie: more urgent) than the previous priority, then note
- * that priority level within the zone.  This is done so that when the next
- * process comes in to scan this zone, it will immediately start out at this
- * priority level rather than having to build up its own scanning priority.
- * Here, this priority affects only the reclaim-mapped threshold.
- */
-static inline void note_zone_scanning_priority(struct zone *zone, int priority)
-{
-	if (priority < zone->prev_priority)
-		zone->prev_priority = priority;
-}
-
-/*
  * This moves pages from the active list to the inactive list.
  *
  * We move them the other way if the page is referenced by one or more
@@ -1553,22 +1539,13 @@ static void shrink_zones(int priority, s
 		if (scanning_global_lru(sc)) {
 			if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
 				continue;
-			note_zone_scanning_priority(zone, priority);
 
 			if (zone_is_all_unreclaimable(zone) &&
 						priority != DEF_PRIORITY)
 				continue;	/* Let kswapd poll it */
-			sc->all_unreclaimable = 0;
-		} else {
-			/*
-			 * Ignore cpuset limitation here. We just want to reduce
-			 * # of used pages by us regardless of memory shortage.
-			 */
-			sc->all_unreclaimable = 0;
-			mem_cgroup_note_reclaim_priority(sc->mem_cgroup,
-							priority);
 		}
 
+		sc->all_unreclaimable = 0;
 		shrink_zone(priority, zone, sc);
 	}
 }
@@ -1676,11 +1653,8 @@ out:
 
 			if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
 				continue;
-
-			zone->prev_priority = priority;
 		}
-	} else
-		mem_cgroup_record_reclaim_priority(sc->mem_cgroup, priority);
+	}
 
 	delayacct_freepages_end();
 
@@ -1769,11 +1743,6 @@ static unsigned long balance_pgdat(pg_da
 		.mem_cgroup = NULL,
 		.isolate_pages = isolate_pages_global,
 	};
-	/*
-	 * temp_priority is used to remember the scanning priority at which
-	 * this zone was successfully refilled to free_pages == pages_high.
-	 */
-	int temp_priority[MAX_NR_ZONES];
 
 loop_again:
 	total_scanned = 0;
@@ -1781,9 +1750,6 @@ loop_again:
 	sc.may_writepage = !laptop_mode;
 	count_vm_event(PAGEOUTRUN);
 
-	for (i = 0; i < pgdat->nr_zones; i++)
-		temp_priority[i] = DEF_PRIORITY;
-
 	for (priority = DEF_PRIORITY; priority >= 0; priority--) {
 		int end_zone = 0;	/* Inclusive.  0 = ZONE_DMA */
 		unsigned long lru_pages = 0;
@@ -1854,9 +1820,7 @@ loop_again:
 			if (!zone_watermark_ok(zone, order, zone->pages_high,
 					       end_zone, 0))
 				all_zones_ok = 0;
-			temp_priority[i] = priority;
 			sc.nr_scanned = 0;
-			note_zone_scanning_priority(zone, priority);
 			/*
 			 * We put equal pressure on every zone, unless one
 			 * zone has way too many pages free already.
@@ -1903,16 +1867,6 @@ loop_again:
 			break;
 	}
 out:
-	/*
-	 * Note within each zone the priority level at which this zone was
-	 * brought into a happy state.  So that the next thread which scans this
-	 * zone will start out at that priority level.
-	 */
-	for (i = 0; i < pgdat->nr_zones; i++) {
-		struct zone *zone = pgdat->node_zones + i;
-
-		zone->prev_priority = temp_priority[i];
-	}
 	if (!all_zones_ok) {
 		cond_resched();
 
@@ -2321,7 +2275,6 @@ static int __zone_reclaim(struct zone *z
 		 */
 		priority = ZONE_RECLAIM_PRIORITY;
 		do {
-			note_zone_scanning_priority(zone, priority);
 			shrink_zone(priority, zone, &sc);
 			priority--;
 		} while (priority >= 0 && sc.nr_reclaimed < nr_pages);
Index: b/include/linux/mmzone.h
===================================================================
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -337,21 +337,6 @@ struct zone {
 	atomic_long_t		vm_stat[NR_VM_ZONE_STAT_ITEMS];
 
 	/*
-	 * prev_priority holds the scanning priority for this zone.  It is
-	 * defined as the scanning priority at which we achieved our reclaim
-	 * target at the previous try_to_free_pages() or balance_pgdat()
-	 * invokation.
-	 *
-	 * We use prev_priority as a measure of how much stress page reclaim is
-	 * under - it drives the swappiness decision: whether to unmap mapped
-	 * pages.
-	 *
-	 * Access to both this field is quite racy even on uniprocessor.  But
-	 * it is expected to average out OK.
-	 */
-	int prev_priority;
-
-	/*
 	 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
 	 * this zone's LRU.  Maintained by the pageout code.
 	 */
Index: b/mm/page_alloc.c
===================================================================
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3516,8 +3516,6 @@ static void __paginginit free_area_init_
 		zone_seqlock_init(zone);
 		zone->zone_pgdat = pgdat;
 
-		zone->prev_priority = DEF_PRIORITY;
-
 		zone_pcp_init(zone);
 		for_each_lru(l) {
 			INIT_LIST_HEAD(&zone->lru[l].list);
Index: b/mm/vmstat.c
===================================================================
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -775,11 +775,9 @@ static void zoneinfo_show_print(struct s
 	}
 	seq_printf(m,
 		   "\n  all_unreclaimable: %u"
-		   "\n  prev_priority:     %i"
 		   "\n  start_pfn:         %lu"
 		   "\n  inactive_ratio:    %u",
 			   zone_is_all_unreclaimable(zone),
-		   zone->prev_priority,
 		   zone->zone_start_pfn,
 		   zone->inactive_ratio);
 	seq_putc(m, '\n');
Index: b/include/linux/memcontrol.h
===================================================================
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -90,12 +90,6 @@ extern void mem_cgroup_end_migration(str
  */
 extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
 extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
-
-extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
-extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
-							int priority);
-extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
-							int priority);
 int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
 unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
 				       struct zone *zone,
@@ -219,21 +213,6 @@ static inline int mem_cgroup_reclaim_imb
 	return 0;
 }
 
-static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
-{
-	return 0;
-}
-
-static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
-						int priority)
-{
-}
-
-static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
-						int priority)
-{
-}
-
 static inline bool mem_cgroup_disabled(void)
 {
 	return true;




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-10 10:57 ` [PATCH] mm: remove zone->prev_prioriy MinChan Kim
@ 2009-02-10 23:12   ` Andrew Morton
  2009-02-11 11:06     ` KOSAKI Motohiro
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2009-02-10 23:12 UTC (permalink / raw)
  To: MinChan Kim
  Cc: kosaki.motohiro, kamezawa.hiroyu, linux-kernel, linux-mm, riel

On Tue, 10 Feb 2009 19:57:01 +0900
MinChan Kim <minchan.kim@gmail.com> wrote:

> As you know, prev_priority is used as a measure of how much stress page reclaim.
> But now we doesn't need it due to split-lru's way.
> 
> I think it would be better to remain why prev_priority isn't needed any more
> and how split-lru can replace prev_priority's role in changelog.
> 
> In future, it help mm newbies understand change history, I think.

Yes, I'd be fascinated to see that explanation.

In http://groups.google.pn/group/linux.kernel/browse_thread/thread/fea9c9a0b43162a1
it was asserted that we intend to use prev_priority again in the future.

We discussed this back in November:
http://lkml.indiana.edu/hypermail/linux/kernel/0811.2/index.html#00001

And I think that I still think that the VM got worse due to its (new)
failure to track previous state.  IIRC, the response to that concern
was quite similar to handwavy waffling.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-10 23:12   ` Andrew Morton
@ 2009-02-11 11:06     ` KOSAKI Motohiro
  2009-02-11 11:12       ` Andrew Morton
  0 siblings, 1 reply; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-02-11 11:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kosaki.motohiro, MinChan Kim, kamezawa.hiroyu, linux-kernel,
	linux-mm, riel

> On Tue, 10 Feb 2009 19:57:01 +0900
> MinChan Kim <minchan.kim@gmail.com> wrote:
> 
> > As you know, prev_priority is used as a measure of how much stress page reclaim.
> > But now we doesn't need it due to split-lru's way.
> > 
> > I think it would be better to remain why prev_priority isn't needed any more
> > and how split-lru can replace prev_priority's role in changelog.
> > 
> > In future, it help mm newbies understand change history, I think.
> 
> Yes, I'd be fascinated to see that explanation.
> 
> In http://groups.google.pn/group/linux.kernel/browse_thread/thread/fea9c9a0b43162a1
> it was asserted that we intend to use prev_priority again in the future.
> 
> We discussed this back in November:
> http://lkml.indiana.edu/hypermail/linux/kernel/0811.2/index.html#00001
> 
> And I think that I still think that the VM got worse due to its (new)
> failure to track previous state.  IIRC, the response to that concern
> was quite similar to handwavy waffling.

Yes.
I still think it's valuable code.
I think, In theory, VM sould take parallel reclaim bonus.

However, recently, KAMEZAWA-san reported memcg prev_priority code are
busted due to hierarchical-memory-reclaim and he dislike maintain 
unused function.

http://marc.info/?l=linux-mm&m=123258289017433&w=2


and, at that time I can't show good example workload of parallel reclaim bonus
effective.
Therefore I agreed to drop this and insert it again at re-using time ;-)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-11 11:06     ` KOSAKI Motohiro
@ 2009-02-11 11:12       ` Andrew Morton
  2009-02-11 11:23         ` KOSAKI Motohiro
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2009-02-11 11:12 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: MinChan Kim, kamezawa.hiroyu, linux-kernel, linux-mm, riel

On Wed, 11 Feb 2009 20:06:46 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > On Tue, 10 Feb 2009 19:57:01 +0900
> > MinChan Kim <minchan.kim@gmail.com> wrote:
> > 
> > > As you know, prev_priority is used as a measure of how much stress page reclaim.
> > > But now we doesn't need it due to split-lru's way.
> > > 
> > > I think it would be better to remain why prev_priority isn't needed any more
> > > and how split-lru can replace prev_priority's role in changelog.
> > > 
> > > In future, it help mm newbies understand change history, I think.
> > 
> > Yes, I'd be fascinated to see that explanation.
> > 
> > In http://groups.google.pn/group/linux.kernel/browse_thread/thread/fea9c9a0b43162a1
> > it was asserted that we intend to use prev_priority again in the future.
> > 
> > We discussed this back in November:
> > http://lkml.indiana.edu/hypermail/linux/kernel/0811.2/index.html#00001
> > 
> > And I think that I still think that the VM got worse due to its (new)
> > failure to track previous state.  IIRC, the response to that concern
> > was quite similar to handwavy waffling.
> 
> Yes.
> I still think it's valuable code.
> I think, In theory, VM sould take parallel reclaim bonus.

prev_priority had nothing to do with concurrent reclaim?

It was there so that when a task enters direct reclaim against a zone,
it will immediately adopt the state which the task which most recently
ran direct reclaim had.

Without this feature, each time a task enters direct reclaim it will need
to "relearn" that state - ramping up, making probably-incorrect
decisions as it does so.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-11 11:12       ` Andrew Morton
@ 2009-02-11 11:23         ` KOSAKI Motohiro
  2009-02-12  0:00           ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-02-11 11:23 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kosaki.motohiro, MinChan Kim, kamezawa.hiroyu, linux-kernel,
	linux-mm, riel

> On Wed, 11 Feb 2009 20:06:46 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> 
> > > On Tue, 10 Feb 2009 19:57:01 +0900
> > > MinChan Kim <minchan.kim@gmail.com> wrote:
> > > 
> > > > As you know, prev_priority is used as a measure of how much stress page reclaim.
> > > > But now we doesn't need it due to split-lru's way.
> > > > 
> > > > I think it would be better to remain why prev_priority isn't needed any more
> > > > and how split-lru can replace prev_priority's role in changelog.
> > > > 
> > > > In future, it help mm newbies understand change history, I think.
> > > 
> > > Yes, I'd be fascinated to see that explanation.
> > > 
> > > In http://groups.google.pn/group/linux.kernel/browse_thread/thread/fea9c9a0b43162a1
> > > it was asserted that we intend to use prev_priority again in the future.
> > > 
> > > We discussed this back in November:
> > > http://lkml.indiana.edu/hypermail/linux/kernel/0811.2/index.html#00001
> > > 
> > > And I think that I still think that the VM got worse due to its (new)
> > > failure to track previous state.  IIRC, the response to that concern
> > > was quite similar to handwavy waffling.
> > 
> > Yes.
> > I still think it's valuable code.
> > I think, In theory, VM sould take parallel reclaim bonus.
> 
> prev_priority had nothing to do with concurrent reclaim?
> 
> It was there so that when a task enters direct reclaim against a zone,
> it will immediately adopt the state which the task which most recently
> ran direct reclaim had.
> 
> Without this feature, each time a task enters direct reclaim it will need
> to "relearn" that state - ramping up, making probably-incorrect
> decisions as it does so.

Yes, I perfectly agree to you.
theorically, prev_priority is very valuable stuff.

rest only problem is, I should found good workload and re-integrate
prev_priority to reclaim code.

I (and many VM people) strongly dislike any regression.
then, if I can't find good workload, I can't change any VM behavior.

Do you have any suggestion?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: remove zone->prev_prioriy
  2009-02-11 11:23         ` KOSAKI Motohiro
@ 2009-02-12  0:00           ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-02-12  0:00 UTC (permalink / raw)
  To: KOSAKI Motohiro; +Cc: Andrew Morton, MinChan Kim, linux-kernel, linux-mm, riel

On Wed, 11 Feb 2009 20:23:39 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > On Wed, 11 Feb 2009 20:06:46 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > 
> > > > On Tue, 10 Feb 2009 19:57:01 +0900
> > > > MinChan Kim <minchan.kim@gmail.com> wrote:
> > > > 
> > > > > As you know, prev_priority is used as a measure of how much stress page reclaim.
> > > > > But now we doesn't need it due to split-lru's way.
> > > > > 
> > > > > I think it would be better to remain why prev_priority isn't needed any more
> > > > > and how split-lru can replace prev_priority's role in changelog.
> > > > > 
> > > > > In future, it help mm newbies understand change history, I think.
> > > > 
> > > > Yes, I'd be fascinated to see that explanation.
> > > > 
> > > > In http://groups.google.pn/group/linux.kernel/browse_thread/thread/fea9c9a0b43162a1
> > > > it was asserted that we intend to use prev_priority again in the future.
> > > > 
> > > > We discussed this back in November:
> > > > http://lkml.indiana.edu/hypermail/linux/kernel/0811.2/index.html#00001
> > > > 
> > > > And I think that I still think that the VM got worse due to its (new)
> > > > failure to track previous state.  IIRC, the response to that concern
> > > > was quite similar to handwavy waffling.
> > > 
> > > Yes.
> > > I still think it's valuable code.
> > > I think, In theory, VM sould take parallel reclaim bonus.
> > 
> > prev_priority had nothing to do with concurrent reclaim?
> > 
> > It was there so that when a task enters direct reclaim against a zone,
> > it will immediately adopt the state which the task which most recently
> > ran direct reclaim had.
> > 
> > Without this feature, each time a task enters direct reclaim it will need
> > to "relearn" that state - ramping up, making probably-incorrect
> > decisions as it does so.
> 
> Yes, I perfectly agree to you.
> theorically, prev_priority is very valuable stuff.
> 

Ok, please implement the lost logic again.

-Kame


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-02-12  0:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-10  9:42 [PATCH] mm: remove zone->prev_prioriy KOSAKI Motohiro
2009-02-10 10:42 ` Johannes Weiner
2009-02-10 10:50   ` KOSAKI Motohiro
2009-02-10 11:49     ` [PATCH] mm,memcg: remove zone->prev_prioriy take2 KOSAKI Motohiro
2009-02-10 10:57 ` [PATCH] mm: remove zone->prev_prioriy MinChan Kim
2009-02-10 23:12   ` Andrew Morton
2009-02-11 11:06     ` KOSAKI Motohiro
2009-02-11 11:12       ` Andrew Morton
2009-02-11 11:23         ` KOSAKI Motohiro
2009-02-12  0:00           ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).