Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445574 > unrolled thread

[PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones()

Started byMel Gorman <mgorman@techsingularity.net>
First post2016-07-18 17:00 +0200
Last post2016-07-19 02:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones() Mel Gorman <mgorman@techsingularity.net> - 2016-07-18 17:00 +0200
    Re: [PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones() Johannes Weiner <hannes@cmpxchg.org> - 2016-07-18 18:20 +0200
    Re: [PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones() Minchan Kim <minchan@kernel.org> - 2016-07-19 02:00 +0200

#1445574 — [PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones()

FromMel Gorman <mgorman@techsingularity.net>
Date2016-07-18 17:00 +0200
Subject[PATCH 1/3] mm, vmscan: Remove redundant check in shrink_zones()
Message-ID<rWibv-7xJ-11@gated-at.bofh.it>
As pointed out by Minchan Kim, shrink_zones() checks for populated
zones in a zonelist but a zonelist can never contain unpopulated
zones. While it's not related to the node-lru series, it can be
cleaned up now.

Suggested-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/vmscan.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3f06a7a0d135..45344acf52ba 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2605,9 +2605,6 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
 
 	for_each_zone_zonelist_nodemask(zone, z, zonelist,
 					sc->reclaim_idx, sc->nodemask) {
-		if (!populated_zone(zone))
-			continue;
-
 		/*
 		 * Take care memory controller reclaiming has small influence
 		 * to global LRU.
-- 
2.6.4

[toc] | [next] | [standalone]


#1445615

FromJohannes Weiner <hannes@cmpxchg.org>
Date2016-07-18 18:20 +0200
Message-ID<rWjqW-8vS-21@gated-at.bofh.it>
In reply to#1445574
On Mon, Jul 18, 2016 at 03:50:24PM +0100, Mel Gorman wrote:
> As pointed out by Minchan Kim, shrink_zones() checks for populated
> zones in a zonelist but a zonelist can never contain unpopulated
> zones. While it's not related to the node-lru series, it can be
> cleaned up now.
> 
> Suggested-by: Minchan Kim <minchan@kernel.org>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>

Ha, I didn't know that. But yeah, the zonelist building code excludes
unpopulated zones from the start. Neat.

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

[toc] | [prev] | [next] | [standalone]


#1445936

FromMinchan Kim <minchan@kernel.org>
Date2016-07-19 02:00 +0200
Message-ID<rWqC5-4yl-3@gated-at.bofh.it>
In reply to#1445574
On Mon, Jul 18, 2016 at 03:50:24PM +0100, Mel Gorman wrote:
> As pointed out by Minchan Kim, shrink_zones() checks for populated
> zones in a zonelist but a zonelist can never contain unpopulated
> zones. While it's not related to the node-lru series, it can be
> cleaned up now.
> 
> Suggested-by: Minchan Kim <minchan@kernel.org>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web