[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6rp73lih7g2b7i5rhsztwc66quq6fi3mesel52uavvt7uhfzlf@6rytjc7gb2tj>
Date: Tue, 30 Apr 2024 09:25:55 -0400
From: Lucas Karpinski <lkarpins@...hat.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: brauner@...nel.org, jack@...e.cz, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, alexl@...hat.com, echanude@...hat.com, ikent@...hat.com,
ahalaney@...hat.com
Subject: Re: [RFC v2 1/1] fs/namespace: defer RCU sync for MNT_DETACH umount
On Fri, Apr 26, 2024 at 09:09:41PM +0100, Al Viro wrote:
> > + call_rcu(&drelease->rcu, delayed_mount_release);
>
> ... which is a bad idea, since call_rcu() callbacks are run
> from interrupt context. Which makes blocking in them a problem.
>
Thanks for the quick review.
Documentation/RCU/checklist.rst suggests switching to queue_rcu_work()
function in scenarios where the callback function can block. This seems
like it would fix the issue you found, while still providing similar
performance improvements.
workqueue:
perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount -l mnt
0.003066 +- 0.000307 seconds time elapsed ( +- 10.02% )
callrcu:
perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount -l mnt
0.0030812 +- 0.0000524 seconds time elapsed ( +- 1.70% )
Regards,
Lucas
Powered by blists - more mailing lists