Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1422174

[RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for DAX inodes

From Waiman Long <Waiman.Long@hpe.com>
Newsgroups linux.kernel
Subject [RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for DAX inodes
Date 2016-06-14 20:20 +0200
Message-ID <rK16q-8sH-27@gated-at.bofh.it> (permalink)
References <rK16q-8sH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch enables reader optimistic spinning for inodes that are
under a DAX-based mount point.

On a 4-socket Haswell machine running on a 4.7-rc1 tip-based kernel,
the fio test with multithreaded randrw and randwrite tests on the
same file on a XFS partition on top of a NVDIMM with DAX were run,
the aggregated bandwidths before and after the patch were as follows:

  Test      BW before patch     BW after patch  % change
  ----      ---------------     --------------  --------
  randrw        1352 MB/s          2164 MB/s      +60%
  randwrite     1710 MB/s          2550 MB/s      +49%

Signed-off-by: Waiman Long <Waiman.Long@hpe.com>
---
 fs/xfs/xfs_icache.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 99ee6ee..09f284f 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -71,6 +71,15 @@ xfs_inode_alloc(
 
 	mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
 
+	/*
+	 * Enable reader spinning for DAX nount point
+	 */
+	if (mp->m_flags & XFS_MOUNT_DAX) {
+		rwsem_set_rspin_threshold(&ip->i_iolock.mr_lock);
+		rwsem_set_rspin_threshold(&ip->i_mmaplock.mr_lock);
+		rwsem_set_rspin_threshold(&ip->i_lock.mr_lock);
+	}
+
 	/* initialise the xfs inode */
 	ip->i_ino = ino;
 	ip->i_mount = mp;
-- 
1.7.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH-tip 0/6] locking/rwsem: Enable reader optimistic spinning Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
  [RFC PATCH-tip 3/6] locking/rwsem: move down rwsem_down_read_failed function Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
  [RFC PATCH-tip 5/6] locking/rwsem: Enable spinning readers Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
  [RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for DAX inodes Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
    Re: [RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for  DAX inodes Christoph Hellwig <hch@infradead.org> - 2016-06-14 20:30 +0200
    Re: [RFC PATCH-tip 6/6] xfs: Enable reader optimistic spinning for  DAX inodes Dave Chinner <david@fromorbit.com> - 2016-06-15 01:10 +0200
  [RFC PATCH-tip 2/6] locking/rwsem: Enable optional count-based spinning on reader Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
    Re: [RFC PATCH-tip 2/6] locking/rwsem: Enable optional count-based  spinning on reader Davidlohr Bueso <dave@stgolabs.net> - 2016-06-14 20:30 +0200
  [RFC PATCH-tip 4/6] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200
  [RFC PATCH-tip 1/6] locking/rwsem: Stop active read lock ASAP Waiman Long <Waiman.Long@hpe.com> - 2016-06-14 20:20 +0200

csiph-web