From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, Mateusz Guzik <mjguzik@gmail.com>,
Eric Dumazet <edumazet@google.com>,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: Re: [RFC] why do we need smp_rmb/smp_wmb pair in fd_install()/expand_fdtable()?
Date: Thu, 8 Aug 2024 04:46:00 +0100 [thread overview]
Message-ID: <20240808034600.GD5334@ZenIV> (raw)
In-Reply-To: <20240808033505.GC5334@ZenIV>
On Thu, Aug 08, 2024 at 04:35:05AM +0100, Al Viro wrote:
> On Wed, Aug 07, 2024 at 08:06:31PM -0700, Linus Torvalds wrote:
> > But release/acquire is the RightThing(tm), and the fact that alpha
> > based its ordering on the bad old model is not really our problem.
>
> alpha would have fuckloads of full barriers simply from all those READ_ONCE()
> in rcu reads...
>
> smp_rmb() is on the side that is much hotter - fd_install() vs. up to what, 25 calls
> of expand_fdtable() per files_struct instance history in the worst possible case?
> With rather big memcpy() done by those calls, at that...
BTW, an alternative would be to have LSB of ->fdt (or ->fd, if we try to
eliminate that extra dereference) for ->resize_in_progress. Then no barrier
is needed for ordering of those. Would cost an extra &~1 on ->fdt fetches,
though...
next prev parent reply other threads:[~2024-08-08 3:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 2:50 [RFC] why do we need smp_rmb/smp_wmb pair in fd_install()/expand_fdtable()? Al Viro
2024-08-08 3:06 ` Linus Torvalds
2024-08-08 3:35 ` Al Viro
2024-08-08 3:46 ` Al Viro [this message]
2024-08-08 6:08 ` Mateusz Guzik
2024-12-05 12:03 ` [RFC PATCH] fs: elide the smp_rmb fence in fd_install() Mateusz Guzik
2024-12-05 14:18 ` Al Viro
2024-12-05 14:43 ` Mateusz Guzik
2024-12-05 18:41 ` Paul E. McKenney
2024-12-05 19:03 ` Mateusz Guzik
2024-12-05 20:01 ` Paul E. McKenney
2024-12-05 20:15 ` Mateusz Guzik
2024-12-05 21:17 ` Paul E. McKenney
2024-12-05 19:26 ` Linus Torvalds
2024-12-05 19:47 ` Mateusz Guzik
2024-12-05 20:11 ` Paul E. McKenney
2024-12-06 12:11 ` Christian Brauner
2024-12-05 20:06 ` Paul E. McKenney
2024-12-05 14:46 ` Jan Kara
2024-12-05 15:01 ` Mateusz Guzik
2024-12-05 15:29 ` Jan Kara
2024-12-05 15:36 ` Mateusz Guzik
2024-12-06 15:32 ` Jan Kara
2024-12-05 14:58 ` Christian Brauner
2024-12-05 15:06 ` Mateusz Guzik
2024-08-08 13:20 ` [RFC] why do we need smp_rmb/smp_wmb pair in fd_install()/expand_fdtable()? Christian Brauner
2024-08-08 16:11 ` Linus Torvalds
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=20240808034600.GD5334@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=edumazet@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=paulmck@kernel.org \
--cc=torvalds@linux-foundation.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 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.