]> git.baikalelectronics.ru Git - kernel.git/commit
fs: Convert nr_inodes and nr_unused to per-cpu counters
authorDave Chinner <dchinner@redhat.com>
Sat, 23 Oct 2010 09:03:02 +0000 (05:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Oct 2010 01:26:09 +0000 (21:26 -0400)
commit6ee39b4c5c2119cb8e92f426d5940e1e97fc8d79
treedab046695754e2cec1a7ab7a64b236e976d94360
parent44aae082614f561dc4b8a2bcf5c63f17d3f15aad
fs: Convert nr_inodes and nr_unused to per-cpu counters

The number of inodes allocated does not need to be tied to the
addition or removal of an inode to/from a list. If we are not tied
to a list lock, we could update the counters when inodes are
initialised or destroyed, but to do that we need to convert the
counters to be per-cpu (i.e. independent of a lock). This means that
we have the freedom to change the list/locking implementation
without needing to care about the counters.

Based on a patch originally from Eric Dumazet.

[AV: cleaned up a bit, fixed build breakage on weird configs

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fs-writeback.c
fs/inode.c
fs/internal.h
include/linux/fs.h
kernel/sysctl.c