Whamcloud - gitweb
DDN-2042 bio: allow BIO integrity to run on any core
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 7 May 2021 21:03:18 +0000 (15:03 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Jul 2021 08:57:32 +0000 (08:57 +0000)
Unbind the bio integrity workqueue so that it can run on any available
core in the system, to improve concurrency for this CPU-bound task if
there are multiple requests being submitted from a single thread.

This is done in the same way in dm-verity-target, which has a similar
CPU profile to bio-integrity.

Update kernel build version to -ddn14.

Test-Parameters: trivial
Reported-by: Greg Edwards <gedwards@ddn.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia299e52db9b0995c8f48372782882324ba3ebbe5
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/44240
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
contrib/lbuild/lbuild-rhel
lustre/kernel_patches/patches/bio-integrity-unbound-concurrency-rhel7.patch [new file with mode: 0644]
lustre/kernel_patches/series/3.10-rhel7.7.series
lustre/kernel_patches/series/3.10-rhel7.9.series

index 043ef49..509109e 100644 (file)
@@ -47,7 +47,7 @@ prepare_and_build_srpm() {
 
        pushd $TOPDIR >/dev/null
        # create the buildid
-       local ddn_tag="ddn13"
+       local ddn_tag="ddn14"
        if $ENABLE_KERNEL_DEBUG; then
                local buildid="_lustre_debug.${ddn_tag}"
        else
diff --git a/lustre/kernel_patches/patches/bio-integrity-unbound-concurrency-rhel7.patch b/lustre/kernel_patches/patches/bio-integrity-unbound-concurrency-rhel7.patch
new file mode 100644 (file)
index 0000000..dfceded
--- /dev/null
@@ -0,0 +1,21 @@
+Increase bio integrity concurrency by unbinding it from a specific core,
+and allow these work items to run on any core.  WQ_UNBOUND queues aren't
+per-cpu, so max_active should be scaled according to the number of cores.
+
+diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
+--- a/fs/bio-integrity.c
++++ b/fs/bio-integrity.c
+@@ -763,10 +763,11 @@ void __init bio_integrity_init(void)
+ {
+       /*
+        * kintegrityd won't block much but may burn a lot of CPU cycles.
+-       * Make it highpri CPU intensive wq with max concurrency of 1.
++       * Make it highpri CPU intensive wq with full concurrency.
+        */
+       kintegrityd_wq = alloc_workqueue("kintegrityd", WQ_MEM_RECLAIM |
+-                                       WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
++                                       WQ_HIGHPRI | WQ_CPU_INTENSIVE |
++                                       WQ_UNBOUND, num_online_cpus());
+       if (!kintegrityd_wq)
+               panic("Failed to create kintegrityd\n");
index 6247b3d..0e30e0f 100644 (file)
@@ -3,6 +3,7 @@ blkdev_tunables-3.9.patch
 vfs-project-quotas-rhel7.patch
 fix-integrity-verify-rhel7.patch
 fix-sd-dif-complete-rhel7.patch
+bio-integrity-unbound-concurrency-rhel7.patch
 scsi-requeue-aborted-commands-instead-of-retry.patch
 block-integrity-allow-optional-integrity-functions-rhel7.patch
 block-pass-bio-into-integrity_processing_fn-rhel7.patch
index b44a770..b505dc0 100644 (file)
@@ -3,6 +3,7 @@ dev_read_only-3.7.patch
 blkdev_tunables-3.9.patch
 vfs-project-quotas-rhel7.patch
 fix-integrity-verify-rhel7.patch
+bio-integrity-unbound-concurrency-rhel7.patch
 scsi-requeue-aborted-commands-instead-of-retry.patch
 block-integrity-allow-optional-integrity-functions-rhel7.patch
 block-pass-bio-into-integrity_processing_fn-rhel7.patch