[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251110064106.GM2441659@ZenIV>
Date: Mon, 10 Nov 2025 06:41:06 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: brauner@...nel.org, jack@...e.cz, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [MEH PATCH] fs: move fd_install() slowpath into a dedicated
routine and provide commentary
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?
Powered by blists - more mailing lists