From: Al Viro <viro@zeniv.linux.org.uk>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [MEH PATCH] fs: move fd_install() slowpath into a dedicated routine and provide commentary
Date: Mon, 10 Nov 2025 06:41:06 +0000 [thread overview]
Message-ID: <20251110064106.GM2441659@ZenIV> (raw)
In-Reply-To: <20251109120259.1283435-1-mjguzik@gmail.com>
On Sun, Nov 09, 2025 at 01:02:59PM +0100, Mateusz Guzik wrote:
> +/*
> + * Install a file pointer in the fd array while it is being resized.
> + *
> + * We need to make sure our update to the array does not get lost as the resizing
> + * thread can be copying the content as we modify it.
> + *
> + * We have two ways to do it:
> + * - go off CPU waiting for resize_in_progress to clear
> + * - take the spin lock
> + *
> + * The latter is trivial to implement and saves us from having to might_sleep()
> + * for debugging purposes.
> + *
> + * This is moved out of line from fd_install() to convince gcc to optimize that
> + * routine better.
> + */
Does it become seriously worse if you move rcu_read_unlock_sched() into the caller?
prev parent reply other threads:[~2025-11-10 6:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-09 12:02 [MEH PATCH] fs: move fd_install() slowpath into a dedicated routine and provide commentary Mateusz Guzik
2025-11-10 6:41 ` Al Viro [this message]
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=20251110064106.GM2441659@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.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).