From: David Woodhouse <dwmw2@infradead.org>
To: jgg@ziepe.ca
Cc: akpm@linux-foundation.org, david@kernel.org, mhocko@suse.com,
rostedt@goodmis.org, bigeasy@linutronix.de,
simona.vetter@ffwll.ch, jglisse@redhat.com,
christian.koenig@amd.com, paulmck@kernel.org, seanjc@google.com,
pbonzini@redhat.com, linux-mm@kvack.org, kvm@vger.kernel.org,
linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/mmu_notifier: Remove non_block_start/end() from notifier invocation
Date: Tue, 11 Aug 2026 18:22:12 +0100 [thread overview]
Message-ID: <f33571137d2e3973e440d09c7602edaebe08b714.camel@infradead.org> (raw)
In-Reply-To: <20260811162423.GL544626@ziepe.ca>
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
On Tue, 2026-08-11 at 13:24 -0300, Jason Gunthorpe wrote:
> To be clear you should not be using any synchronize_[s]rcu() primitive
> inside the invalidation callbacks. These are well known to have
> multi-second delays on loaded systems which are a completely
> inappropriate performance characteristic for these mm callbacks.
>
> This statement has nothing to do with deadlock.
>
> RCU is always a trade off, you can make the read side run really fast
> and the write side is ghastly slow. If you can't handle the slow write
> you shouldn't use RCU techniques.
The multi-second horror stories are about the *global* RCU/SRCU
domains, where the grace period has to wait out arbitrary readers all
over the kernel.
This is not that. It is a dedicated srcu_struct, private to one VM,
and its entire reader population is a handful of KVM fast paths that
until now were under irqsave rwlocks.
Each of those read-side sections is a few hundred instructions over a
single page of guest memory — they never allocate, never take a lock,
never sleep. The number of readers in existence at any instant is
bounded by the number of vCPUs plus a few interrupt contexts, and the
grace period is bounded by the longest of those sections.
I should actually change to synchronize_srcu_expedited() — and perhaps
we could ponder an even more expedited mode which does the first check
directly and in the common case doesn't even *use* the workqueue — but
even without doing that, the write side is never going to be as
"ghastly slow" as you seem to think, *even* for the tiny handful of
virtual addresses for which it even kicks in at all.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6179 bytes --]
next prev parent reply other threads:[~2026-08-11 17:22 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 8:58 David Woodhouse
2026-08-11 13:55 ` Jason Gunthorpe
2026-08-11 14:21 ` David Woodhouse
2026-08-11 14:27 ` Jason Gunthorpe
2026-08-11 14:33 ` David Woodhouse
2026-08-11 14:42 ` Steven Rostedt
2026-08-11 15:24 ` David Woodhouse
2026-08-11 15:30 ` Jason Gunthorpe
2026-08-12 8:14 ` Michal Hocko
2026-08-12 8:21 ` David Woodhouse
2026-08-12 12:27 ` Jason Gunthorpe
2026-08-12 13:46 ` David Woodhouse
2026-08-12 13:49 ` Jason Gunthorpe
2026-08-12 14:05 ` David Woodhouse
2026-08-12 14:26 ` Jason Gunthorpe
2026-08-12 14:38 ` David Woodhouse
2026-08-13 10:05 ` David Woodhouse
2026-08-13 13:59 ` Sean Christopherson
2026-08-13 14:40 ` Jason Gunthorpe
2026-08-12 14:34 ` David Woodhouse
2026-08-12 15:03 ` David Woodhouse
2026-08-12 15:49 ` David Woodhouse
2026-08-12 16:20 ` Sean Christopherson
2026-08-12 17:17 ` David Woodhouse
2026-08-12 21:38 ` Paul E. McKenney
2026-08-12 21:55 ` David Woodhouse
2026-08-13 7:54 ` David Woodhouse
2026-08-18 18:18 ` Paul E. McKenney
2026-08-18 18:28 ` David Woodhouse
2026-08-20 14:43 ` David Woodhouse
2026-08-21 17:38 ` Paul E. McKenney
2026-08-25 12:15 ` David Woodhouse
2026-08-25 16:47 ` Paul E. McKenney
2026-08-25 17:05 ` David Woodhouse
2026-08-25 17:19 ` Paul E. McKenney
2026-08-25 17:48 ` David Woodhouse
2026-08-25 18:16 ` Paul E. McKenney
2026-08-25 19:58 ` Sean Christopherson
2026-08-25 20:51 ` Paul E. McKenney
2026-08-26 7:32 ` Sebastian Andrzej Siewior
2026-08-26 7:38 ` David Woodhouse
2026-08-26 15:05 ` Paul E. McKenney
2026-08-26 16:28 ` Paul E. McKenney
2026-08-26 18:01 ` David Woodhouse
2026-08-26 19:59 ` Paul E. McKenney
2026-08-26 20:30 ` David Woodhouse
2026-08-26 21:04 ` Paul E. McKenney
2026-08-27 8:20 ` Sebastian Andrzej Siewior
2026-08-27 23:25 ` David Woodhouse
2026-08-28 23:18 ` David Woodhouse
2026-09-01 0:58 ` Paul E. McKenney
2026-09-01 9:40 ` David Woodhouse
2026-09-01 19:12 ` Sean Christopherson
2026-09-01 20:40 ` Paul E. McKenney
2026-09-01 22:51 ` Sean Christopherson
2026-09-01 22:53 ` David Woodhouse
2026-09-01 23:05 ` Paul E. McKenney
2026-08-12 16:04 ` Paolo Bonzini
2026-08-12 16:07 ` Jason Gunthorpe
2026-08-12 17:49 ` David Woodhouse
2026-08-20 13:30 ` Sebastian Andrzej Siewior
2026-08-20 14:26 ` David Woodhouse
2026-08-20 15:34 ` Sebastian Andrzej Siewior
2026-08-20 18:49 ` David Woodhouse
2026-08-12 8:13 ` Michal Hocko
2026-08-11 15:29 ` Jason Gunthorpe
2026-08-11 15:15 ` David Woodhouse
2026-08-11 15:24 ` Jason Gunthorpe
2026-08-11 15:29 ` David Woodhouse
2026-08-11 16:24 ` Jason Gunthorpe
2026-08-11 17:22 ` David Woodhouse [this message]
2026-08-11 17:26 ` Jason Gunthorpe
2026-08-11 17:59 ` David Woodhouse
2026-08-11 18:19 ` Jason Gunthorpe
2026-08-11 20:06 ` Sean Christopherson
2026-08-11 20:21 ` Paolo Bonzini
2026-08-11 21:14 ` David Woodhouse
2026-08-11 22:58 ` Sean Christopherson
2026-08-11 23:50 ` David Woodhouse
2026-08-12 10:25 ` David Woodhouse
2026-08-12 16:07 ` Sean Christopherson
2026-08-11 20:29 ` David Woodhouse
2026-08-11 15:12 ` David Hildenbrand (Arm)
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=f33571137d2e3973e440d09c7602edaebe08b714.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=christian.koenig@amd.com \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=mhocko@suse.com \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=rostedt@goodmis.org \
--cc=seanjc@google.com \
--cc=simona.vetter@ffwll.ch \
/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®