Whamcloud - gitweb
LU-9160 ldiskfs: preload block group descriptors 22/25722/7
authorArtem Blagodarenko <artem.blagodarenko@seagate.com>
Sat, 18 Feb 2017 09:00:13 +0000 (12:00 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 8 Mar 2018 17:36:23 +0000 (17:36 +0000)
With 300TB OST size, we saw slow mount time, which
caused 13 minutes, with this patch applied, it reduced
to 30s, so this patch greatly reduce mount time, backport
it from Linux upstream.

Linux-commit: 85c8f176a6111ecde9c158109989dbd445a0e59a

With enabled meta_bg option block group descriptors
reading IO is not sequential and requires optimization.

Seagate-bug-id: MRP-4129
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Change-Id: Iaa621c11ff88364021887d9f9dcec250dd5fd955
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/25722
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
ldiskfs/kernel_patches/patches/rhel7.2/ext4-preread-gd.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.2.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.3.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.4.series

diff --git a/ldiskfs/kernel_patches/patches/rhel7.2/ext4-preread-gd.patch b/ldiskfs/kernel_patches/patches/rhel7.2/ext4-preread-gd.patch
new file mode 100644 (file)
index 0000000..db3abe6
--- /dev/null
@@ -0,0 +1,29 @@
+commit 85c8f176a6111ecde9c158109989dbd445a0e59a
+Author: Andrew Perepechko <andrew.perepechko@seagate.com>
+AuthorDate: Sun Apr 30 00:46:35 2017 -0400
+Commit: Theodore Ts'o <tytso@mit.edu>
+CommitDate: Sun Apr 30 00:46:35 2017 -0400
+ext4: preload block group descriptors
+
+With enabled meta_bg option block group descriptors
+reading IO is not sequential and requires optimization.
+
+Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Index: fs/ext4/super.c
+===================================================================
+--- linux-stage/fs/ext4/super.c.orig
++++ linux-stage.orig/fs/ext4/super.c
+@@ -3918,6 +3919,12 @@ static int ext4_fill_super(struct super_
+       bgl_lock_init(sbi->s_blockgroup_lock);
++      /* Pre-read the descriptors into the buffer cache */
++      for (i = 0; i < db_count; i++) {
++              block = descriptor_loc(sb, logical_sb_block, i);
++              sb_breadahead(sb, block);
++      }
++
+       for (i = 0; i < db_count; i++) {
+               block = descriptor_loc(sb, logical_sb_block, i);
+               sbi->s_group_desc[i] = sb_bread(sb, block);
index a0724e0..aa1627d 100644 (file)
@@ -32,3 +32,4 @@ rhel7/ext4-projid-xfs-ioctls.patch
 rhel7/ext4-fix-xattr-shifting-when-expanding-inodes.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
 rhel7/ext4-fix-xattr-shifting-when-expanding-inodes.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
+rhel7.2/ext4-preread-gd.patch
index fa59ce5..6f7a0db 100644 (file)
@@ -32,3 +32,4 @@ rhel6.3/ext4-dont-check-in-ro.patch
 rhel7.2/ext4-dont-check-before-replay.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
 rhel7.2/ext4-dont-check-before-replay.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
+rhel7.2/ext4-preread-gd.patch
index f88c700..d9f7d95 100644 (file)
@@ -32,3 +32,4 @@ rhel6.3/ext4-dont-check-in-ro.patch
 rhel7.4/ext4-dont-check-before-replay.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
 rhel7.4/ext4-dont-check-before-replay.patch
 rhel7/ext4-cleanup-goto-next-group.patch
 rhel7/ext4-reduce-lock-contention-in-__ext4_new_inode.patch
+rhel7.2/ext4-preread-gd.patch