]> git.karo-electronics.de Git - karo-tx-linux.git/commit
procfs: improve scaling in proc
authorNathan Zimmer <nzimmer@sgi.com>
Wed, 20 Mar 2013 04:08:31 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 22 Mar 2013 04:33:56 +0000 (15:33 +1100)
commit69d52bde6543cedfc7c15dcb49e225083ff061aa
tree4a86ce4e33cacc6b68fa83d586c02fc6d3dd5e3a
parentfdaf900010e1c9b357e30994c7074b1af50c5cd3
procfs: improve scaling in proc

I am currently tracking a hotlock reported by a customer on a large
system, 512 cores.  I am currently running 3.8-rc7 but the issue looks
like it has been this way for a very long time.  The offending lock is
proc_dir_entry->pde_unload_lock.

This patch converts the lock to use rcu.  However the pde_openers list
still is controlled by a spin lock.  I tested on a 4096 machine and the
lock doesn't seem hot at least according to perf.

This is a refresh of what was orignally suggested by Eric Dumazet some
time ago.  I have also taken in some comments from Andrew and several
other people whose names escape me but I am quite grateful too.

Supporting numbers, lower is better, they are from the test I posted earlier.
cpuinfo baseline        Rcu
tasks   read-sec        read-sec
1       0.0141          0.0141
2       0.0140          0.0142
4       0.0140          0.0141
8       0.0145          0.0140
16      0.0553          0.0168
32      0.1688          0.0549
64      0.5017          0.1690
128     1.7005          0.5038
256     5.2513          2.0804
512     8.0529          3.0162

Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/generic.c
fs/proc/inode.c
include/linux/proc_fs.h