From 97fba9aa48ca05fbee7390d6aca6daab2c3a8c9d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 7 May 2021 15:03:18 -0600 Subject: [PATCH] DDN-2042 bio: allow BIO integrity to run on any core 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 Signed-off-by: Andreas Dilger Change-Id: Ia299e52db9b0995c8f48372782882324ba3ebbe5 Reviewed-by: Wang Shilong Reviewed-by: Yang Sheng Reviewed-by: Li Xi Reviewed-on: https://review.whamcloud.com/44240 Tested-by: jenkins Tested-by: Maloo --- contrib/lbuild/lbuild-rhel | 2 +- .../bio-integrity-unbound-concurrency-rhel7.patch | 21 +++++++++++++++++++++ lustre/kernel_patches/series/3.10-rhel7.7.series | 1 + lustre/kernel_patches/series/3.10-rhel7.9.series | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 lustre/kernel_patches/patches/bio-integrity-unbound-concurrency-rhel7.patch diff --git a/contrib/lbuild/lbuild-rhel b/contrib/lbuild/lbuild-rhel index 043ef49..509109e 100644 --- a/contrib/lbuild/lbuild-rhel +++ b/contrib/lbuild/lbuild-rhel @@ -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 index 0000000..dfceded --- /dev/null +++ b/lustre/kernel_patches/patches/bio-integrity-unbound-concurrency-rhel7.patch @@ -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"); + diff --git a/lustre/kernel_patches/series/3.10-rhel7.7.series b/lustre/kernel_patches/series/3.10-rhel7.7.series index 6247b3d..0e30e0f 100644 --- a/lustre/kernel_patches/series/3.10-rhel7.7.series +++ b/lustre/kernel_patches/series/3.10-rhel7.7.series @@ -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 diff --git a/lustre/kernel_patches/series/3.10-rhel7.9.series b/lustre/kernel_patches/series/3.10-rhel7.9.series index b44a770..b505dc0 100644 --- a/lustre/kernel_patches/series/3.10-rhel7.9.series +++ b/lustre/kernel_patches/series/3.10-rhel7.9.series @@ -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 -- 1.8.3.1