From: Mike Galbraith Subject: Re: [PATCH] vfs: Speed up deactivate_super for non-modular filesystems Date: Tue, 08 May 2012 06:53:27 +0200 Message-ID: <1336452807.21924.13.camel@marge.simpson.net> References: <1336142995.25479.49.camel@marge.simpson.net> <1336150643.7502.4.camel@marge.simpson.net> <1336197362.7346.9.camel@marge.simpson.net> <1336198093.7346.11.camel@marge.simpson.net> <1336201977.7346.22.camel@marge.simpson.net> <87r4uv64oj.fsf_-_@xmission.com> <20120507221706.GI22082@ZenIV.linux.org.uk> <20120507235647.GH21152@linux.vnet.ibm.com> <87zk9jzdi5.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: paulmck@linux.vnet.ibm.com, Al Viro , Andrew Morton , Oleg Nesterov , LKML , Pavel Emelyanov , Cyrill Gorcunov , Louis Rilling , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: "Eric W. Biederman" Return-path: In-Reply-To: <87zk9jzdi5.fsf@xmission.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 2012-05-07 at 18:07 -0700, Eric W. Biederman wrote: > "Paul E. McKenney" writes: > What I see as the real need is the filesystem modules need to do: > rcu_barrier() > kmem_cache_destroy(cache); > > Perhaps we can add some helpers to make it easy. But I think > I would be happy today with simply moving the rcu_barrier into > every filesystems module exit path, just before the file system > module destoryed it's inode cache. One liner kills the reap bottleneck and 99.999% of cache bloat. 1000 backgrounded vfstpd testcases finished ~instantly and left one persistent pid namespace vs taking ages and bloating very badly. Hacked up hackbench still hurts with all (except user) namespaces, but that's a different problem (modulo hackbench wonderfulness). Previous numbers: default flags = SIGCHLD -namespace: flag |= CLONE_NEWPID -all: flags |= CLONE_NEWIPC | CLONE_NEWNET | CLONE_NEWUSER marge:/usr/local/tmp/starvation # ./hackbench Running with 10*40 (== 400) tasks. Time: 2.636 marge:/usr/local/tmp/starvation # ./hackbench -namespace Running with 10*40 (== 400) tasks. Time: 11.624 marge:/usr/local/tmp/starvation # ./hackbench -namespace -all Running with 10*40 (== 400) tasks. Time: 51.474 New numbers: marge:/usr/local/tmp/starvation # time ./hackbench Running with 10*40 (== 400) tasks. Time: 2.718 real 0m2.877s user 0m0.060s sys 0m10.057s marge:/usr/local/tmp/starvation # time ./hackbench -namespace Running with 10*40 (== 400) tasks. Time: 2.689 real 0m2.878s user 0m0.060s sys 0m9.945s marge:/usr/local/tmp/starvation # time ./hackbench -namespace -all Running with 10*40 (== 400) tasks. Time: 2.521 real 0m27.774s user 0m0.048s sys 0m21.681s marge:/usr/local/tmp/starvation #