lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120608232811.GA18981@otc-wbsnb-06>
Date:	Sat, 9 Jun 2012 02:28:11 +0300
From:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Boaz Harrosh <bharrosh@...asas.com>,
	Tao Ma <boyu.mt@...bao.com>, Nick Piggin <npiggin@...nel.dk>,
	"Dmitry V. Levin" <ldv@...linux.org>,
	v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-afs@...ts.infradead.org,
	linux-btrfs@...r.kernel.org, ceph-devel@...r.kernel.org,
	linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
	codalist@...EMANN.coda.cs.cmu.edu, ecryptfs@...r.kernel.org,
	osd-dev@...n-osd.org, linux-ext4@...r.kernel.org,
	fuse-devel@...ts.sourceforge.net, linux-mtd@...ts.infradead.org,
	jfs-discussion@...ts.sourceforge.net, logfs@...fs.org,
	linux-nfs@...r.kernel.org, linux-nilfs@...r.kernel.org,
	linux-ntfs-dev@...ts.sourceforge.net, ocfs2-devel@....oracle.com,
	reiserfs-devel@...r.kernel.org
Subject: Re: [RFC, PATCH, RESEND] fs: push rcu_barrier() from
 deactivate_locked_super() to filesystems

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@...ux.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@...ux.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

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ