mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Pedro Falcato <pfalcato@suse.de>
Cc: Seunghyun An <san55@wisc.edu>,
	linux-mm@kvack.org,  Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	"Liam R . Howlett" <liam@infradead.org>,
	 Jann Horn <jannh@google.com>,
	Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	Suren Baghdasaryan <surenb@google.com>,
	 linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/rmap: use vm_pgoff for anonymous VMAs in linear_anon_page_index()
Date: Tue, 10 Nov 2026 12:59:50 +0000	[thread overview]
Message-ID: <avMS8RyqNQ89a9hP@gremlin> (raw)
In-Reply-To: <avL5C_w-wo6bJJTj@pedro-suse.tail5790ac.ts.net>

On Tue, Nov 10, 2026 at 11:25:13AM +0000, Pedro Falcato wrote:
> I trust Lorenzo knows more about his plans to use anon_pgoff than I do,
> so I'll let him reply. A comment though:

Thanks.

I'm taking over the series rather than replying further, as is general practice
with this kind of submission.

Will post something in a little while.

>
> > Measured on an AMD EPYC 9634 (84 cores, 12 CCDs, CONFIG_DEBUG_VM=n), on
> > mainline after v7.4-rc1 (the base of this series). Threads share one
> > anonymous VMA, each faults its own slice and zaps it with MADV_DONTNEED;
> > faults/s, median of 3:
> >
> >   CPUs                      base      patched
> >   1 CCD,   7 threads        2.360M    2.369M   +0.4%
> >   7 CCDs,  1 thread each    1.738M    1.982M  +14.0%
>
> This is not particularly surprising. CCDs have their own L3 cache. I'm not
> surprised the coherency penalty is much higher cross-CCD.

Right. And a lot of these workloads seem to work backwards from the problem
'let's find the worst possible scenario for this, then microbenchmark it,
surprise it turns out it performs badly'.

Even the real-world usecase (no citation as to _actually_ encountering it) seems
to follow the same pattern.

I expect we'll continue to see more of this stuff over time, sigh.

In any case, the solution seems to be the same in general - don't do this check
in non-debug.

--
Cheers, Lorenzo

  reply	other threads:[~2026-11-10 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  0:00 [PATCH 0/2] mm: avoid redundant reads of the vm_refcnt cacheline in anonymous faults Seunghyun An
2026-11-10  0:00 ` [PATCH 1/2] mm/rmap: use vm_pgoff for anonymous VMAs in linear_anon_page_index() Seunghyun An
2026-11-10 11:25   ` Pedro Falcato
2026-11-10 12:59     ` Lorenzo Stoakes (ARM) [this message]
2026-11-10  0:00 ` [PATCH 2/2] mm/vma: only assert VMA stability in vma_has_anon_rmap() with CONFIG_DEBUG_VM Seunghyun An
2026-11-10 11:03 ` [PATCH 0/2] mm: avoid redundant reads of the vm_refcnt cacheline in anonymous faults Lorenzo Stoakes (ARM)
2026-11-10 14:34   ` Seunghyun An

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=avMS8RyqNQ89a9hP@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pfalcato@suse.de \
    --cc=san55@wisc.edu \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /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

all inboxes | Powered by JetHome®