From 8541d71266e723a9e73659a885aa3edb3893562c Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Sat, 11 Sep 2021 02:59:32 -0500 Subject: [PATCH] LU-14033 ldiskfs: Fix mballoc prefetch patch ext4-mballoc-prefetch patch was inadvertently broken during patch rebasing. In ext4_read_block_bitmap(): ext4_read_block_bitmap_nowait() should not ignore locked Test-Parameters: trivial HPE-bug-id: LUS-9805 Fixes: fc87b01f96e8 ("LU-12477 ldiskfs: remove obsolete ext4 patches") Signed-off-by: Shaun Tancheff Change-Id: I6ebe9dfe48f48706da3623e3d32d33dddf35b395 Reviewed-on: https://review.whamcloud.com/44894 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: James Simmons --- .../kernel_patches/patches/rhel7.6/ext4-mballoc-prefetch.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-mballoc-prefetch.patch b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-mballoc-prefetch.patch index adeb497..5e4cd06 100644 --- a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-mballoc-prefetch.patch +++ b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-mballoc-prefetch.patch @@ -29,7 +29,7 @@ int err; - bh = ext4_read_block_bitmap_nowait(sb, block_group); -+ bh = ext4_read_block_bitmap_nowait(sb, block_group, 1); ++ bh = ext4_read_block_bitmap_nowait(sb, block_group, 0); if (!bh) return NULL; err = ext4_wait_block_bitmap(sb, block_group, bh); @@ -203,7 +203,7 @@ return err; } -@@ -2832,6 +2925,22 @@ int ext4_mb_init(struct super_block * +@@ -2832,6 +2925,24 @@ int ext4_mb_init(struct super_block * sbi->s_mb_large_req = sbi->s_stripe * 8; sbi->s_mb_group_prealloc = sbi->s_stripe * 4; } @@ -221,8 +221,10 @@ + * load too many groups, at some point we should start to use what + * we've got in memory. + * with an average random access time 5ms, it'd take a second to get -+ * 200 groups (* N with flex_bg), so let's make this limit 32 */ -+ sbi->s_mb_prefetch_limit = sbi->s_mb_prefetch * 32; ++ * 200 groups (* N with flex_bg), so let's make this limit 4 */ ++ sbi->s_mb_prefetch_limit = sbi->s_mb_prefetch * 4; ++ if (sbi->s_mb_prefetch_limit > ext4_get_groups_count(sb)) ++ sbi->s_mb_prefetch_limit = ext4_get_groups_count(sb); sbi->s_locality_groups = alloc_percpu(struct ext4_locality_group); if (sbi->s_locality_groups == NULL) { -- 1.8.3.1