From: Kent Overstreet <kent.overstreet@linux.dev>
To: Casey Chen <cachen@purestorage.com>
Cc: akpm@linux-foundation.org, surenb@google.com, corbet@lwn.net,
dennis@kernel.org, tj@kernel.org, cl@gentwo.org, vbabka@suse.cz,
mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org,
ziy@nvidia.com, rientjes@google.com, roman.gushchin@linux.dev,
harry.yoo@oracle.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
yzhong@purestorage.com, souravpanda@google.com,
00107082@163.com
Subject: Re: [PATCH v3] alloc_tag: add per-NUMA node stats
Date: Thu, 10 Jul 2025 23:09:28 -0400 [thread overview]
Message-ID: <vyguhk4hzhf6zyg6hn77satnmsrsr5hmcl7bifws32bnilqbs2@374p6che72yz> (raw)
In-Reply-To: <CALCePG1h8NE010EGpBh8CxhiWqr4-GantEJ4P0Dnck+cnioBiw@mail.gmail.com>
On Thu, Jul 10, 2025 at 06:07:13PM -0700, Casey Chen wrote:
> On Thu, Jul 10, 2025 at 5:54 PM Kent Overstreet
> <kent.overstreet@linux.dev> wrote:
> >
> > On Thu, Jul 10, 2025 at 05:42:05PM -0700, Casey Chen wrote:
> > > Hi All,
> > >
> > > Thanks for reviewing my previous patches. I am replying some comments
> > > in our previous discussion
> > > https://lore.kernel.org/all/CAJuCfpHhSUhxer-6MP3503w6520YLfgBTGp7Q9Qm9kgN4TNsfw@mail.gmail.com/T/#u
> > >
> > > Most people care about the motivations and usages of this feature.
> > > Internally, we used to have systems having asymmetric memory to NUMA
> > > nodes. Node 0 uses a lot of memory but node 1 is pretty empty.
> > > Requests to allocate memory on node 0 always fail. With this patch, we
> > > can find the imbalance and optimize the memory usage. Also, David
> > > Rientjes and Sourav Panda provide their scenarios in which this patch
> > > would be very useful. It is easy to turn on an off so I think it is
> > > nice to have, enabling more scenarios in the future.
> > >
> > > Andrew / Kent,
> > > * I agree with Kent on using for_each_possible_cpu rather than
> > > for_each_online_cpu, considering CPU online/offline.
> > > * When failing to allocate counters for in-kernel alloc_tag, panic()
> > > is better than WARN(), eventually the kernel would panic at invalid
> > > memory access.
> > > * percpu stats would bloat data structures quite a bit.
> > >
> > > David Wang,
> > > I don't really understand what is 'granularity of calling sites'. If
> > > NUMA imbalance is found, the calling site could request memory
> > > allocation from different nodes. Other factors can affect NUMA
> > > balance, those information can be implemented in a different patch.
> >
> > Let's get this functionality in.
> >
> > We've already got userspace parsing and consuming /proc/allocinfo, so we
> > just need to do it without changing that format.
>
> You mean keep the format without per-NUMA info the same as before ?
> My patch v3 changed the header and the alignment of bytes and calls. I
> can restore them back.
I mean an ioctl interface - so we can have a userspace program with
different switches for getting different types of output.
Otherwise the existing programs people have already written for
consuming /proc/allocinfo are going to break.
next prev parent reply other threads:[~2025-07-11 3:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 0:23 [PATCH v3] alloc_tag: add per-NUMA node stats Casey Chen
2025-07-11 0:42 ` Casey Chen
2025-07-11 0:53 ` Kent Overstreet
2025-07-11 1:07 ` Casey Chen
2025-07-11 3:09 ` Kent Overstreet [this message]
2025-07-11 17:41 ` Casey Chen
2025-07-11 18:14 ` Kent Overstreet
2025-07-11 4:14 ` David Wang
2025-07-24 0:37 ` Casey Chen
2025-07-31 11:55 ` Usama Arif
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=vyguhk4hzhf6zyg6hn77satnmsrsr5hmcl7bifws32bnilqbs2@374p6che72yz \
--to=kent.overstreet@linux.dev \
--cc=00107082@163.com \
--cc=akpm@linux-foundation.org \
--cc=cachen@purestorage.com \
--cc=cl@gentwo.org \
--cc=corbet@lwn.net \
--cc=dennis@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=harry.yoo@oracle.com \
--cc=jackmanb@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=souravpanda@google.com \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=vbabka@suse.cz \
--cc=yzhong@purestorage.com \
--cc=ziy@nvidia.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).