]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: revert per-cpu nr_unused counters for dentry and inodes
authorNick Piggin <npiggin@kernel.dk>
Fri, 7 Jan 2011 06:49:18 +0000 (17:49 +1100)
committerNick Piggin <npiggin@kernel.dk>
Fri, 7 Jan 2011 06:50:17 +0000 (17:50 +1100)
commit84f8d18a3295f0d5800e8cbad44b2200a3ac19c2
tree316517d7c03d9caf0577acc517532ed2bc1801cc
parent14d71e6db83cece19e83a13e66e09480ebf5620d
vfs: revert per-cpu nr_unused counters for dentry and inodes

The nr_unused counters count the number of objects on an LRU, and as such they
are synchronized with LRU object insertion and removal and scanning, and
protected under the LRU lock.

Making it per-cpu does not actually get any concurrency improvements because of
this lock, and summing the counter is much slower, and
incrementing/decrementing it costs more code size and is slower too.

These counters should stay per-LRU, which currently means global.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
fs/dcache.c
fs/inode.c