From: Mel Gorman <mgorman@techsingularity.net>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, shakeelb@google.com,
yang.shi@linux.alibaba.com
Subject: Re: [RFC Patch] mm/vmscan.c: not inherit classzone_idx from previous reclaim
Date: Tue, 11 Feb 2020 10:42:23 +0000 [thread overview]
Message-ID: <20200211104223.GL3466@techsingularity.net> (raw)
In-Reply-To: <20200209074145.31389-1-richardw.yang@linux.intel.com>
On Sun, Feb 09, 2020 at 03:41:45PM +0800, Wei Yang wrote:
> Before commit e716f2eb24de ("mm, vmscan: prevent kswapd sleeping
> prematurely due to mismatched classzone_idx"), classzone_idx could have
> two possibilities on a new loop based on whether there is a wakeup
> during reclaiming:
>
> * 0 if no wakeup
> * the classzone_idx request by wakeup
>
> As described in the changelog, this commit is willing to change the
> first case to (MAX_NR_ZONES - 1) to avoid some premature sleep. But it
> does not achieve the goal.
>
> There are two versions of kswapd_classzone_idx() since this change:
>
> * commit e716f2eb24de ("mm, vmscan: prevent kswapd sleeping
> prematurely due to mismatched classzone_idx")
> * commit dffcac2cb88e ("mm/vmscan.c: prevent useless kswapd loops")
>
> Both of them would return the classzone_idx we passed as the 2nd
> parameter when (pgdat->kswapd_classzone_idx == MAX_NR_ZONES). This
> means if there is no wakeup during reclaiming, we would use
> classzone_idx in previous round to sleep.
>
This is somewhat intended.
> This patch fixes the logic by using (MAX_NR_ZONES - 1) for the first
> case.
>
Ok, what is the user-visible impact that is fixed by this patch or is
this based on code review only? Please describe the test case exactly
and the before and after results. I ask because this area is a magnet for
regressions and intuitive ideas often lead to counter-intuitive results.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2020-02-11 10:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 7:41 [RFC Patch] mm/vmscan.c: not inherit classzone_idx from previous reclaim Wei Yang
2020-02-11 10:42 ` Mel Gorman [this message]
2020-02-12 2:25 ` Wei Yang
2020-02-12 7:43 ` Mel Gorman
2020-02-14 2:05 ` Wei Yang
2020-02-14 2:48 ` Matthew Wilcox
2020-02-14 7:35 ` Wei Yang
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=20200211104223.GL3466@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=richardw.yang@linux.intel.com \
--cc=shakeelb@google.com \
--cc=yang.shi@linux.alibaba.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 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).