Whamcloud - gitweb
LU-6527 ldiskfs: Journal commit callback optimization 35/18835/5
authorYang Sheng <yang.sheng@intel.com>
Wed, 9 Mar 2016 15:01:14 +0000 (23:01 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Mar 2016 18:45:35 +0000 (18:45 +0000)
Porting patch for RHEL7, SLES11 & SLES12

This is a porting patch from:
Lustre-change: http://review.whamcloud.com/14611/
Lustre-commit: 55afbf5934e145e48a31193de601abd58e605a42

    Don't take spinlock in tgt_cb_last_committed, if
    exp_last_committed was updated with higher trasno.
    Also change list_add_tail to list_add. It gives
    advantages to ldiskfs in tgt_cb_last_committed.
    In the beginning of list will be placed thandles
    with the highest transaction numbers. So at the
    first iterations we will have the highest transno.
    It will save from extra call of
    ptlrpc_commit_replies.

Signed-off-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Xyratex-bug-id: MRP-2575
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com>
Tested-by: Alexander Lezhoev <alexander.lezhoev@seagate.com>
Reviewed-by: Alexey Leonidovich Lyashkov <alexey.lyashkov@seagate.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I3e7f28e5386cf77f3139ff0d330afadf8864c293
Reviewed-on: http://review.whamcloud.com/18835
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
ldiskfs/kernel_patches/patches/rhel7/ext4-jcb-optimization.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/sles11sp2/ext4-journal-callback.patch
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.2.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.series
ldiskfs/kernel_patches/series/ldiskfs-3.12-sles12.series
ldiskfs/kernel_patches/series/ldiskfs-3.12-sles12sp1.series

diff --git a/ldiskfs/kernel_patches/patches/rhel7/ext4-jcb-optimization.patch b/ldiskfs/kernel_patches/patches/rhel7/ext4-jcb-optimization.patch
new file mode 100644 (file)
index 0000000..2d25d14
--- /dev/null
@@ -0,0 +1,19 @@
+Change list_add_tail to list_add. It gives advantages to ldiskfs
+in tgt_cb_last_committed. In the beginning of list will be placed
+thandles with the highest transaction numbers. So at the first
+iterations we will have the highest transno. It will save from
+extra call of ptlrpc_commit_replies.
+
+Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/ext4_jbd2.c
+===================================================================
+--- linux-3.10.0-229.1.2.fc21.x86_64.orig/fs/ext4/ext4_jbd2.h
++++ linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/ext4_jbd2.h
+@@ -3644,7 +3644,7 @@ void ext4_truncate(struct inode *inode)
+       /* Add the jce to transaction's private list */
+       jce->jce_func = func;
+       spin_lock(&sbi->s_md_lock);
+-      list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list);
++      list_add(&jce->jce_list, &handle->h_transaction->t_private_list);
+       spin_unlock(&sbi->s_md_lock);
+ }
index f55e6ce..6294be9 100644 (file)
@@ -79,7 +79,7 @@ Acked-by: Jeff Mahoney <jeffm@suse.com>
 +      /* Add the jce to transaction's private list */
 +      jce->jce_func = func;
 +      spin_lock(&sbi->s_md_lock);
-+      list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list);
++      list_add(&jce->jce_list, &handle->h_transaction->t_private_list);
 +      spin_unlock(&sbi->s_md_lock);
 +}
 +
index 39046a6..db32551 100644 (file)
@@ -19,3 +19,4 @@ rhel7/ext4-remove-truncate-warning.patch
 rhel7/ext4-corrupted-inode-block-bitmaps-handling-patches.patch
 rhel7/ext4-give-warning-with-dir-htree-growing.patch
 rhel7/ext4-mmp-brelse.patch
+rhel7/ext4-jcb-optimization.patch
index cee174a..69906c5 100644 (file)
@@ -19,3 +19,4 @@ rhel7/ext4-remove-truncate-warning.patch
 rhel7/ext4-corrupted-inode-block-bitmaps-handling-patches.patch
 rhel7/ext4-give-warning-with-dir-htree-growing.patch
 rhel7/ext4-mmp-brelse.patch
+rhel7/ext4-jcb-optimization.patch
index 570d558..286fbf1 100644 (file)
@@ -19,3 +19,4 @@ sles12/ext4-remove-truncate-warning.patch
 sles12/ext4-corrupted-inode-block-bitmaps-handling-patches.patch
 rhel7/ext4-give-warning-with-dir-htree-growing.patch
 rhel7/ext4-mmp-brelse.patch
+rhel7/ext4-jcb-optimization.patch
index e114f92..9ba99ec 100644 (file)
@@ -19,3 +19,4 @@ sles12/ext4-remove-truncate-warning.patch
 sles12/ext4-corrupted-inode-block-bitmaps-handling-patches.patch
 rhel7/ext4-give-warning-with-dir-htree-growing.patch
 rhel7/ext4-mmp-brelse.patch
+rhel7/ext4-jcb-optimization.patch