Skip to contentSkip to conversation

mm: vmscan: reclaim highmem zone if buffer_heads is over limit

PATCH In review Minchan Kim 3 participants 4 messages Apr 1, 2016 – Apr 3, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: vmscan: reclaim highmem zone if buffer_heads is over limit

We have been reclaimed highmem zone if buffer_heads is over limit but [1] changed the behavior so it doesn't reclaim highmem zone although buffer_heads is over the limit.
This patch restores the logic.

As well, [2] removed classzone_idx so we don't need code related to it. This patch cleans it up.

[1] commit 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()")
[2] commit 5acbd3bfc93b ("mm, oom: rework oom detection")

Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
---
 mm/vmscan.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
mm/vmscan.c +1 -9
index c7696a2e11c7..6e67de2a61ed 100644
@@ -2550,17 +2550,9 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
 		sc->gfp_mask |= __GFP_HIGHMEM;
 
 	for_each_zone_zonelist_nodemask(zone, z, zonelist,
-					requested_highidx, sc->nodemask) {
-		enum zone_type classzone_idx;
-
+					gfp_zone(sc->gfp_mask), sc->nodemask) {
 		if (!populated_zone(zone))
 			continue;
-
-		classzone_idx = requested_highidx;
-		while (!populated_zone(zone->zone_pgdat->node_zones +
-							classzone_idx))
-			classzone_idx--;
-
 		/*
 		 * Take care memory controller reclaiming has small influence
 		 * to global LRU.
Signature · 7 lines
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
reviewer
#1 lore raw

On Fri 01-04-16 17:00:58, Minchan Kim wrote:
[...]

Quoted 1 line

[2] commit 5acbd3bfc93b ("mm, oom: rework oom detection")

I didn't look a tht patch yet but wanted to note that this sha is most probably from linux-next and won't be stable. Also this patch will most likely see some changes in future so making changes on top which should go in independetly will likely just complicate things.

Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer
#2 lore raw
Quoted 8 lines · On Fri, 1 Apr 2016 10:03:50 +0200 Michal Hocko <[email protected]> wrote:

On Fri 01-04-16 17:00:58, Minchan Kim wrote:
[...]

Quoted 1 line

[2] commit 5acbd3bfc93b ("mm, oom: rework oom detection")

I didn't look a tht patch yet but wanted to note that this sha is most probably from linux-next and won't be stable. Also this patch will most likely see some changes in future so making changes on top which should go in independetly will likely just complicate things.

Yes, we'll need two patches please. One to fix 6b4f7799c6a5 ("mm:
vmscan: invoke slab shrinkers from shrink_zone()") (which is in mainline) and a second to clean up -mm's "mm, oom: rework oom detection".

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 6 lines · Andrew Morton
Quoted 4 lines · On Fri, 1 Apr 2016 10:03:50 +0200 Michal Hocko <[email protected]> wrote:

On Fri 01-04-16 17:00:58, Minchan Kim wrote:
[...]

Quoted 1 line

[2] commit 5acbd3bfc93b ("mm, oom: rework oom detection")

Quoted 8 lines
Quoted 4 lines

I didn't look a tht patch yet but wanted to note that this sha is most probably from linux-next and won't be stable. Also this patch will most likely see some changes in future so making changes on top which should go in independetly will likely just complicate things.

Yes, we'll need two patches please. One to fix 6b4f7799c6a5 ("mm:
vmscan: invoke slab shrinkers from shrink_zone()") (which is in mainline) and a second to clean up -mm's "mm, oom: rework oom detection".

Andrew, Michal

Thanks. I just sent out it as separate patch.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>