From: Wei Xu <weixugc@google.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Huang Ying <ying.huang@intel.com>,
Yang Shi <shy828301@gmail.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Tim C Chen <tim.c.chen@intel.com>,
Michal Hocko <mhocko@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hesham Almatary <hesham.almatary@huawei.com>,
Dave Hansen <dave.hansen@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Alistair Popple <apopple@nvidia.com>,
Dan Williams <dan.j.williams@intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
jvgediya.oss@gmail.com, Bharata B Rao <bharata@amd.com>
Subject: Re: [PATCH mm-unstable] mm/demotion: Make toptier_distance inclusive upper bound of toptiers
Date: Tue, 30 Aug 2022 08:48:22 -0700 [thread overview]
Message-ID: <CAAPL-u9HDu4Kk23S+mTueCfnHG7ujQJH5zqgkwmyAN52et26SA@mail.gmail.com> (raw)
In-Reply-To: <20220830081457.118960-1-aneesh.kumar@linux.ibm.com>
On Tue, Aug 30, 2022 at 1:15 AM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> Based on suggestion from Wei Xu <weixugc@google.com>, having an
> inclusive upper bound is found simpler.
>
> Fixes: mm/demotion: Update node_is_toptier to work with memory tiers
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> mm/memory-tiers.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index c4bd6d052a33..c82eb0111383 100644
> --- a/mm/memory-tiers.c
> +++ b/mm/memory-tiers.c
> @@ -179,7 +179,7 @@ bool node_is_toptier(int node)
> toptier = true;
> goto out;
> }
> - if (memtier->adistance_start < top_tier_adistance)
> + if (memtier->adistance_start <= top_tier_adistance)
> toptier = true;
> else
> toptier = false;
> @@ -361,7 +361,8 @@ static void establish_demotion_targets(void)
> * abstract distance below the max value of this memtier
below -> up to ? Looks good to me otherwise.
Wei
> * is considered toptier.
> */
> - top_tier_adistance = memtier->adistance_start + MEMTIER_CHUNK_SIZE;
> + top_tier_adistance = memtier->adistance_start +
> + MEMTIER_CHUNK_SIZE - 1;
> break;
> }
> }
> --
> 2.37.2
>
prev parent reply other threads:[~2022-08-30 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 8:14 Aneesh Kumar K.V
2022-08-30 15:48 ` Wei Xu [this message]
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=CAAPL-u9HDu4Kk23S+mTueCfnHG7ujQJH5zqgkwmyAN52et26SA@mail.gmail.com \
--to=weixugc@google.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=apopple@nvidia.com \
--cc=bharata@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave@stgolabs.net \
--cc=hannes@cmpxchg.org \
--cc=hesham.almatary@huawei.com \
--cc=jvgediya.oss@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shy828301@gmail.com \
--cc=tim.c.chen@intel.com \
--cc=ying.huang@intel.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