linux-stable/fs/xfs/linux-2.6
Dave Chinner 74f75a0cb7 xfs: convert buffer cache hash to rbtree
The buffer cache hash is showing typical hash scalability problems.
In large scale testing the number of cached items growing far larger
than the hash can efficiently handle. Hence we need to move to a
self-scaling cache indexing mechanism.

I have selected rbtrees for indexing becuse they can have O(log n)
search scalability, and insert and remove cost is not excessive,
even on large trees. Hence we should be able to cache large numbers
of buffers without incurring the excessive cache miss search
penalties that the hash is imposing on us.

To ensure we still have parallel access to the cache, we need
multiple trees. Rather than hashing the buffers by disk address to
select a tree, it seems more sensible to separate trees by typical
access patterns. Most operations use buffers from within a single AG
at a time, so rather than searching lots of different lists,
separate the buffer indexes out into per-AG rbtrees. This means that
searches during metadata operation have a much higher chance of
hitting cache resident nodes, and that updates of the tree are less
likely to disturb trees being accessed on other CPUs doing
independent operations.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-10-18 15:07:56 -05:00
..
kmem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h
sv.h remove dead code from sv_t implementation 2008-12-04 15:39:21 +11:00
time.h
xfs_acl.c xfs: split xfs_itrace_entry 2010-07-26 13:16:44 -05:00
xfs_aops.c xfs: do not discard page cache data on EAGAIN 2010-08-24 11:47:51 +10:00
xfs_aops.h direct-io: move aio_complete into ->end_io 2010-07-26 16:09:02 -05:00
xfs_buf.c xfs: convert buffer cache hash to rbtree 2010-10-18 15:07:56 -05:00
xfs_buf.h xfs: convert buffer cache hash to rbtree 2010-10-18 15:07:56 -05:00
xfs_cred.h [XFS] Fix merge failures 2008-12-29 16:47:18 +11:00
xfs_export.c xfs: remove xfs_iput_new 2010-07-26 13:16:44 -05:00
xfs_export.h
xfs_file.c xfs: remove a dmapi leftover 2010-07-26 13:16:47 -05:00
xfs_fs_subr.c xfs: use range primitives for xfs page cache operations 2010-10-18 15:07:24 -05:00
xfs_globals.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_globals.h CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
xfs_ioctl.c xfs: don't use vfs writeback for pure metadata modifications 2010-10-18 15:07:45 -05:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_ioctl32.c xfs: Introduce XFS_IOC_ZERO_RANGE 2010-10-18 15:07:25 -05:00
xfs_ioctl32.h [XFS] fix compile on 32 bit systems 2008-12-04 13:07:29 +11:00
xfs_iops.c xfs: don't use vfs writeback for pure metadata modifications 2010-10-18 15:07:45 -05:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: new truncate sequence 2010-08-09 16:47:42 -04:00
xfs_quotaops.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2010-08-07 12:57:07 -07:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c xfs: store xfs_mount in the buftarg instead of in the xfs_buf 2010-10-18 15:07:48 -05:00
xfs_super.h xfs: drop dmapi hooks 2010-07-26 13:16:33 -05:00
xfs_sync.c xfs: serialise inode reclaim within an AG 2010-10-18 15:07:55 -05:00
xfs_sync.h xfs: implement batched inode lookups for AG walking 2010-10-18 15:07:53 -05:00
xfs_sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_trace.c xfs: remove unneeded #include statements 2010-07-26 13:16:33 -05:00
xfs_trace.h xfs: split inode AG walking into separate code for reclaim 2010-10-18 15:07:52 -05:00
xfs_version.h
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00