From: Michal Hocko <mhocko@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dongjoo Seo <dongjoo.linux.dev@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
dave@stgolabs.net, dan.j.williams@intel.com, nifan@outlook.com,
a.manzanares@samsung.com
Subject: Re: [PATCH] mm/page_alloc: fix NUMA stats update for cpu-less nodes
Date: Wed, 23 Oct 2024 23:38:40 +0200 [thread overview]
Message-ID: <Zxls4HqdkV_yBYxZ@tiehlicka> (raw)
In-Reply-To: <20241023134121.68d4af59e2d9cc3e78a34cc8@linux-foundation.org>
On Wed 23-10-24 13:41:21, Andrew Morton wrote:
> On Wed, 23 Oct 2024 20:03:24 +0200 Michal Hocko <mhocko@suse.com> wrote:
>
> > On Wed 23-10-24 10:50:37, Dongjoo Seo wrote:
> > > This patch corrects this issue by:
> >
> > What is this issue? Please describe the problem first,
>
> Actually, relocating the author's second-last paragraph to
> top-of-changelog produced a decent result ;)
>
> > ideally describe
> > the NUMA topology, workload and what kind of misaccounting happens
> > (expected values vs. really reported values).
>
> I think the changelog covered this adequately?
>
> So with these changelog alterations I've queued this for 6.12-rcX with
> a cc:stable. As far as I can tell this has been there since 2018.
>
> : In the case of memoryless node, when a process prefers a node with no
> : memory(e.g., because it is running on a CPU local to that node), the
> : kernel treats a nearby node with memory as the preferred node. As a
> : result, such allocations do not increment the numa_foreign counter on the
> : memoryless node, leading to skewed NUMA_HIT, NUMA_MISS, and NUMA_FOREIGN
> : stats for the nearest node.
I am sorry but I still do not underastand that. Especially when I do
look at the patch which would like to treat cpuless nodes specially.
Let me be more specific. Why ...
> - if (zone_to_nid(z) != numa_node_id())
> + if (zone_to_nid(z) != numa_node_id() || z_is_cpuless)
> local_stat = NUMA_OTHER;
>
> - if (zone_to_nid(z) == zone_to_nid(preferred_zone))
> + if (zone_to_nid(z) == zone_to_nid(preferred_zone) && !z_is_cpuless)
> __count_numa_events(z, NUMA_HIT, nr_account);
> else {
> __count_numa_events(z, NUMA_MISS, nr_account);
> - __count_numa_events(preferred_zone, NUMA_FOREIGN, nr_account);
> + if (!pref_is_cpuless)
> + __count_numa_events(preferred_zone, NUMA_FOREIGN, nr_account);
... a (well?) established meaning of local needs to be changed? Why
prefrerred policy should have a different meaning for cpuless policies?
Those are memory specific rather than cpu specific right?
Quite some quiestions to have it in linux-next IMHO....
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2024-10-23 21:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 17:50 [PATCH] mm/page_alloc: fix NUMA stats update for cpu-less nodes Dongjoo Seo
2024-10-23 18:03 ` Michal Hocko
2024-10-23 20:41 ` Andrew Morton
2024-10-23 21:38 ` Michal Hocko [this message]
2024-10-23 22:15 ` Dongjoo Seo
2024-10-23 22:23 ` Michal Hocko
2024-10-24 4:54 ` Dongjoo Seo
2024-10-24 8:24 ` Michal Hocko
2024-10-24 18:13 ` Dongjoo Seo
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=Zxls4HqdkV_yBYxZ@tiehlicka \
--to=mhocko@suse.com \
--cc=a.manzanares@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=dongjoo.linux.dev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nifan@outlook.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.