linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vmscan : simplify code
@ 2009-11-26  2:13 Huang Shijie
  2009-11-26  2:54 ` KOSAKI Motohiro
  2009-12-06  3:48 ` Wu Fengguang
  0 siblings, 2 replies; 3+ messages in thread
From: Huang Shijie @ 2009-11-26  2:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Huang Shijie

simplify the code for shrink_inactive_list.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
---
 mm/vmscan.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 777af57..0a3cf75 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1166,10 +1166,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
 		__mod_zone_page_state(zone, NR_ISOLATED_ANON, nr_anon);
 		__mod_zone_page_state(zone, NR_ISOLATED_FILE, nr_file);
 
-		reclaim_stat->recent_scanned[0] += count[LRU_INACTIVE_ANON];
-		reclaim_stat->recent_scanned[0] += count[LRU_ACTIVE_ANON];
-		reclaim_stat->recent_scanned[1] += count[LRU_INACTIVE_FILE];
-		reclaim_stat->recent_scanned[1] += count[LRU_ACTIVE_FILE];
+		reclaim_stat->recent_scanned[0] += nr_anon;
+		reclaim_stat->recent_scanned[1] += nr_file;
 
 		spin_unlock_irq(&zone->lru_lock);
 
-- 
1.6.0.6

--
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>

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

* Re: [PATCH] vmscan : simplify code
  2009-11-26  2:13 [PATCH] vmscan : simplify code Huang Shijie
@ 2009-11-26  2:54 ` KOSAKI Motohiro
  2009-12-06  3:48 ` Wu Fengguang
  1 sibling, 0 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-11-26  2:54 UTC (permalink / raw)
  To: Huang Shijie; +Cc: kosaki.motohiro, akpm, linux-mm

> simplify the code for shrink_inactive_list.
> 
> Signed-off-by: Huang Shijie <shijie8@gmail.com>
> ---
>  mm/vmscan.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 777af57..0a3cf75 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1166,10 +1166,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
>  		__mod_zone_page_state(zone, NR_ISOLATED_ANON, nr_anon);
>  		__mod_zone_page_state(zone, NR_ISOLATED_FILE, nr_file);
>  
> -		reclaim_stat->recent_scanned[0] += count[LRU_INACTIVE_ANON];
> -		reclaim_stat->recent_scanned[0] += count[LRU_ACTIVE_ANON];
> -		reclaim_stat->recent_scanned[1] += count[LRU_INACTIVE_FILE];
> -		reclaim_stat->recent_scanned[1] += count[LRU_ACTIVE_FILE];
> +		reclaim_stat->recent_scanned[0] += nr_anon;
> +		reclaim_stat->recent_scanned[1] += nr_file;
>  
>  		spin_unlock_irq(&zone->lru_lock);

Thank you.
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>



--
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>

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

* Re: [PATCH] vmscan : simplify code
  2009-11-26  2:13 [PATCH] vmscan : simplify code Huang Shijie
  2009-11-26  2:54 ` KOSAKI Motohiro
@ 2009-12-06  3:48 ` Wu Fengguang
  1 sibling, 0 replies; 3+ messages in thread
From: Wu Fengguang @ 2009-12-06  3:48 UTC (permalink / raw)
  To: Huang Shijie; +Cc: akpm, linux-mm

On Thu, Nov 26, 2009 at 10:13:48AM +0800, Huang Shijie wrote:
> simplify the code for shrink_inactive_list.
> 
> Signed-off-by: Huang Shijie <shijie8@gmail.com>

Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>

--
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>

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

end of thread, other threads:[~2009-12-06  3:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26  2:13 [PATCH] vmscan : simplify code Huang Shijie
2009-11-26  2:54 ` KOSAKI Motohiro
2009-12-06  3:48 ` Wu Fengguang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox