[RFC, PATCH, RESEND] fs: push rcu_barrier() from deactivate_locked_super() to filesystems
Kirill A. Shutemov
kirill.shutemov at linux.intel.com
Fri Jun 8 19:28:11 EDT 2012
On Fri, Jun 08, 2012 at 03:25:50PM -0700, Andrew Morton wrote:
> On Sat, 9 Jun 2012 01:14:46 +0300
> "Kirill A. Shutemov" <kirill.shutemov at linux.intel.com> wrote:
>
> > On Fri, Jun 08, 2012 at 03:02:53PM -0700, Andrew Morton wrote:
> > > On Sat, 9 Jun 2012 00:41:03 +0300
> > > "Kirill A. Shutemov" <kirill.shutemov at linux.intel.com> wrote:
> > >
> > > > There's no reason to call rcu_barrier() on every deactivate_locked_super().
> > > > We only need to make sure that all delayed rcu free inodes are flushed
> > > > before we destroy related cache.
> > > >
> > > > Removing rcu_barrier() from deactivate_locked_super() affects some
> > > > fas paths. E.g. on my machine exit_group() of a last process in IPC
> > > > namespace takes 0.07538s. rcu_barrier() takes 0.05188s of that time.
> > >
> > > What an unpleasant patch. Is final-process-exiting-ipc-namespace a
> > > sufficiently high-frequency operation to justify the change?
>
> This, please.
ALT Linux guys use a namespaces (including IPC namespace) to create
sandbox[1] for build system and other use cases. The build system calls
the sandboxing wrapper frequently on setup building chroot and build
prepare. This kind of delays affect timings significantly.
[1] http://git.altlinux.org/people/ldv/packages/hasher-priv.git
> > > I don't really understand what's going on here. Are you saying that
> > > there is some filesystem against which we run deactivate_locked_super()
> > > during exit_group(), and that this filesystem doesn't use rcu-freeing
> > > of inodes? The description needs this level of detail, please.
>
> You still haven't explained where this deactivate_locked_super() call
> is coming from. Oh well.
Call Trace:
[<ffffffff81443a2a>] schedule+0x3a/0x50
[<ffffffff81441e7d>] schedule_timeout+0x1cd/0x2c0
[<ffffffff811f8f87>] ? mqueue_destroy_inode+0x17/0x20
[<ffffffff81443044>] wait_for_common+0xc4/0x160
[<ffffffff8107af50>] ? try_to_wake_up+0x2a0/0x2a0
[<ffffffff810d63b0>] ? call_rcu_sched+0x10/0x20
[<ffffffff810d63a0>] ? call_rcu_bh+0x20/0x20
[<ffffffff81443188>] wait_for_completion+0x18/0x20
[<ffffffff810d5a9b>] _rcu_barrier.clone.31+0x9b/0xb0
[<ffffffff810d5ac0>] rcu_barrier_sched+0x10/0x20
[<ffffffff810d5ad9>] rcu_barrier+0x9/0x10
[<ffffffff811602c9>] deactivate_locked_super+0x49/0x90
[<ffffffff81160d35>] deactivate_super+0x45/0x60
[<ffffffff8117ad74>] mntput_no_expire+0x104/0x150
[<ffffffff8117addc>] mntput+0x1c/0x30
[<ffffffff8117cda7>] kern_unmount+0x27/0x30
[<ffffffff811faeb0>] mq_put_mnt+0x10/0x20
[<ffffffff811fb57f>] put_ipc_ns+0x3f/0xb0
[<ffffffff81071f5c>] free_nsproxy+0x3c/0xa0
[<ffffffff81072143>] switch_task_namespaces+0x33/0x40
[<ffffffff8107215b>] exit_task_namespaces+0xb/0x10
[<ffffffff8104f154>] do_exit+0x4b4/0x8a0
[<ffffffff8104f7e3>] do_group_exit+0x53/0xc0
[<ffffffff8104f862>] sys_exit_group+0x12/0x20
[<ffffffff8144c939>] system_call_fastpath+0x16/0x1b
--
Kirill A. Shutemov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120609/cf1df8cb/attachment-0001.sig>
More information about the linux-mtd
mailing list