All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 039/101] mm, page_alloc: wake kswapd based on the highest eligible zone
@ 2016-07-28 22:46 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-28 22:46 UTC (permalink / raw)
  To: torvalds, mm-commits, akpm, mgorman, hannes, hillf.zj,
	iamjoonsoo.kim, mhocko, minchan, riel, vbabka

From: Mel Gorman <mgorman@techsingularity.net>
Subject: mm, page_alloc: wake kswapd based on the highest eligible zone

The ac_classzone_idx is used as the basis for waking kswapd and that is based
on the preferred zoneref. If the preferred zoneref's first zone is lower
than what is available on other nodes, it's possible that kswapd is woken
on a zone with only higher, but still eligible, zones. As classzone_idx
is strictly adhered to now, it causes a problem because eligible pages
are skipped.

For example, node 0 has only DMA32 and node 1 has only NORMAL. An allocating
context running on node 0 may wake kswapd on node 1 telling it to skip
all NORMAL pages.

Link: http://lkml.kernel.org/r/1467970510-21195-23-git-send-email-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/page_alloc.c~mm-page_alloc-wake-kswapd-based-on-the-highest-eligible-zone mm/page_alloc.c
--- a/mm/page_alloc.c~mm-page_alloc-wake-kswapd-based-on-the-highest-eligible-zone
+++ a/mm/page_alloc.c
@@ -3372,7 +3372,7 @@ static void wake_all_kswapds(unsigned in
 	for_each_zone_zonelist_nodemask(zone, z, ac->zonelist,
 					ac->high_zoneidx, ac->nodemask) {
 		if (last_pgdat != zone->zone_pgdat)
-			wakeup_kswapd(zone, order, ac_classzone_idx(ac));
+			wakeup_kswapd(zone, order, ac->high_zoneidx);
 		last_pgdat = zone->zone_pgdat;
 	}
 }
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-28 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 22:46 [patch 039/101] mm, page_alloc: wake kswapd based on the highest eligible zone akpm

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.