Skip to content

Commit

Permalink
[XFS] On machines with more than 8 cpus, when running parallel I/O
Browse files Browse the repository at this point in the history
threads, the incore superblock lock becomes the limiting factor for
buffered write throughput. Make the contended fields in the incore
superblock use per-cpu counters so that there is no global lock to limit
scalability.

SGI-PV: 946630
SGI-Modid: xfs-linux-melb:xfs-kern:25106a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
David Chinner authored and Nathan Scott committed Mar 14, 2006
1 parent 9f4cbec commit 8d280b9
Show file tree
Hide file tree
Showing 5 changed files with 586 additions and 17 deletions.
5 changes: 5 additions & 0 deletions fs/xfs/linux-2.6/xfs_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
*/
#undef HAVE_REFCACHE /* reference cache not needed for NFS in 2.6 */
#define HAVE_SENDFILE /* sendfile(2) exists in 2.6, but not in 2.4 */
#if CONFIG_SMP
#define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */
#else
#undef HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */
#endif

/*
* State flag for unwritten extent buffers.
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ xfs_fs_counts(
{
unsigned long s;

xfs_icsb_sync_counters_lazy(mp);
s = XFS_SB_LOCK(mp);
cnt->freedata = mp->m_sb.sb_fdblocks;
cnt->freertx = mp->m_sb.sb_frextents;
Expand Down
Loading

0 comments on commit 8d280b9

Please sign in to comment.