linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone
  2016-07-01 15:37 [PATCH 00/31] Move LRU page reclaim from zones to nodes v8 Mel Gorman
@ 2016-07-01 15:37 ` Mel Gorman
  0 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2016-07-01 15:37 UTC (permalink / raw)
  To: Andrew Morton, Linux-MM
  Cc: Rik van Riel, Vlastimil Babka, Johannes Weiner, LKML, Mel Gorman

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

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2fe2fbb4f2ad..b10bee2e5968 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3415,7 +3415,7 @@ static void wake_all_kswapds(unsigned int order, const struct alloc_context *ac)
 	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;
 	}
 }
-- 
2.6.4

--
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 related	[flat|nested] 4+ messages in thread

* [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone
  2016-07-01 20:01 [PATCH 00/31] Move LRU page reclaim from zones to nodes v8 Mel Gorman
@ 2016-07-01 20:01 ` Mel Gorman
  0 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2016-07-01 20:01 UTC (permalink / raw)
  To: Andrew Morton, Linux-MM
  Cc: Rik van Riel, Vlastimil Babka, Johannes Weiner, LKML, Mel Gorman

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

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2fe2fbb4f2ad..b10bee2e5968 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3415,7 +3415,7 @@ static void wake_all_kswapds(unsigned int order, const struct alloc_context *ac)
 	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;
 	}
 }
-- 
2.6.4

--
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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone
       [not found] <00e101d1d689$b9a1d730$2ce58590$@alibaba-inc.com>
@ 2016-07-05  6:57 ` Hillf Danton
  2016-07-05 10:49   ` Mel Gorman
  0 siblings, 1 reply; 4+ messages in thread
From: Hillf Danton @ 2016-07-05  6:57 UTC (permalink / raw)
  To: Mel Gorman; +Cc: linux-kernel, linux-mm, Andrew Morton

> 
> 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 highest 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.
> 
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> ---
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>

>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2fe2fbb4f2ad..b10bee2e5968 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3415,7 +3415,7 @@ static void wake_all_kswapds(unsigned int order, const struct alloc_context *ac)
>  	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;
>  	}
>  }
> --
> 2.6.4


--
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] 4+ messages in thread

* Re: [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone
  2016-07-05  6:57 ` [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone Hillf Danton
@ 2016-07-05 10:49   ` Mel Gorman
  0 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2016-07-05 10:49 UTC (permalink / raw)
  To: Hillf Danton; +Cc: linux-kernel, linux-mm, Andrew Morton

On Tue, Jul 05, 2016 at 02:57:38PM +0800, Hillf Danton wrote:
> > 
> > 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 highest 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.
> > 
> > Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> > ---
> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
> 

Thanks. I also noticed when applying the ack that "zoneref's highest
zone" should have been "zoneref's first zone" so fixed that too.

-- 
Mel Gorman
SUSE Labs

--
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] 4+ messages in thread

end of thread, other threads:[~2016-07-05 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <00e101d1d689$b9a1d730$2ce58590$@alibaba-inc.com>
2016-07-05  6:57 ` [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone Hillf Danton
2016-07-05 10:49   ` Mel Gorman
2016-07-01 20:01 [PATCH 00/31] Move LRU page reclaim from zones to nodes v8 Mel Gorman
2016-07-01 20:01 ` [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2016-07-01 15:37 [PATCH 00/31] Move LRU page reclaim from zones to nodes v8 Mel Gorman
2016-07-01 15:37 ` [PATCH 21/31] mm, page_alloc: Wake kswapd based on the highest eligible zone Mel Gorman

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