From: Johannes Weiner <hannes@cmpxchg.org>
To: Weijie Yang <weijie.yang@samsung.com>
Cc: 'Mel Gorman' <mgorman@suse.de>,
'Andrew Morton' <akpm@linux-foundation.org>,
'Rik van Riel' <riel@redhat.com>,
rientjes@google.com, 'Weijie Yang' <weijie.yang.kh@gmail.com>,
'linux-kernel' <linux-kernel@vger.kernel.org>,
'Linux-MM' <linux-mm@kvack.org>
Subject: Re: [PATCH] mm: page_alloc: avoid wakeup kswapd on the unintended node
Date: Fri, 29 Aug 2014 09:09:25 -0400 [thread overview]
Message-ID: <20140829130925.GA9900@cmpxchg.org> (raw)
In-Reply-To: <000001cfc357$74db64a0$5e922de0$%yang@samsung.com>
On Fri, Aug 29, 2014 at 03:03:19PM +0800, Weijie Yang wrote:
> When enter page_alloc slowpath, we wakeup kswapd on every pgdat
> according to the zonelist and high_zoneidx. However, this doesn't
> take nodemask into account, and could prematurely wakeup kswapd on
> some unintended nodes.
>
> This patch uses for_each_zone_zonelist_nodemask() instead of
> for_each_zone_zonelist() in wake_all_kswapds() to avoid the above situation.
>
> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Wow, we have never respected nodemask when waking kswapd, but your
change does make sense to me.
As far as impact go, this has the chance of reducing reclaim/swapping
for certain configurations. Higher-order wakeups on an ineligible
zone are more obviously undesirable, but even order-0 rebalancing is
not necessarily a future investment for other allocations on that
node, as other allocations may have access to the free pages of a
third node and overall demand might drop before these are exhausted.
This reminds me of the issue fixed in 3a025760fc15 ("mm: page_alloc:
spill to remote nodes before waking kswapd"), where accidental eager
order-0 rebalancing turned out to be a true waste.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Weijie Yang <weijie.yang@samsung.com>
Cc: "'Mel Gorman'" <mgorman@suse.de>,
"'Andrew Morton'" <akpm@linux-foundation.org>,
"'Rik van Riel'" <riel@redhat.com>,
rientjes@google.com, "'Weijie Yang'" <weijie.yang.kh@gmail.com>,
"'linux-kernel'" <linux-kernel@vger.kernel.org>,
"'Linux-MM'" <linux-mm@kvack.org>
Subject: Re: [PATCH] mm: page_alloc: avoid wakeup kswapd on the unintended node
Date: Fri, 29 Aug 2014 09:09:25 -0400 [thread overview]
Message-ID: <20140829130925.GA9900@cmpxchg.org> (raw)
In-Reply-To: <000001cfc357$74db64a0$5e922de0$%yang@samsung.com>
On Fri, Aug 29, 2014 at 03:03:19PM +0800, Weijie Yang wrote:
> When enter page_alloc slowpath, we wakeup kswapd on every pgdat
> according to the zonelist and high_zoneidx. However, this doesn't
> take nodemask into account, and could prematurely wakeup kswapd on
> some unintended nodes.
>
> This patch uses for_each_zone_zonelist_nodemask() instead of
> for_each_zone_zonelist() in wake_all_kswapds() to avoid the above situation.
>
> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Wow, we have never respected nodemask when waking kswapd, but your
change does make sense to me.
As far as impact go, this has the chance of reducing reclaim/swapping
for certain configurations. Higher-order wakeups on an ineligible
zone are more obviously undesirable, but even order-0 rebalancing is
not necessarily a future investment for other allocations on that
node, as other allocations may have access to the free pages of a
third node and overall demand might drop before these are exhausted.
This reminds me of the issue fixed in 3a025760fc15 ("mm: page_alloc:
spill to remote nodes before waking kswapd"), where accidental eager
order-0 rebalancing turned out to be a true waste.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2014-08-29 13:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 7:03 [PATCH] mm: page_alloc: avoid wakeup kswapd on the unintended node Weijie Yang
2014-08-29 7:03 ` Weijie Yang
2014-08-29 8:12 ` Mel Gorman
2014-08-29 8:12 ` Mel Gorman
2014-08-29 9:12 ` Weijie Yang
2014-08-29 9:12 ` Weijie Yang
2014-08-29 13:09 ` Johannes Weiner [this message]
2014-08-29 13:09 ` Johannes Weiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140829130925.GA9900@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=weijie.yang.kh@gmail.com \
--cc=weijie.yang@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.