From: Greg Kroah-Hartman Date: Thu, 10 May 2018 10:48:58 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v3.18.109~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=827d288a4075502a488df6b7a5a9700be59af12a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: ib-device-convert-ib-comp-wq-to-be-cpu-bound.patch --- diff --git a/queue-4.9/ib-device-convert-ib-comp-wq-to-be-cpu-bound.patch b/queue-4.9/ib-device-convert-ib-comp-wq-to-be-cpu-bound.patch new file mode 100644 index 00000000000..f83f96a6afa --- /dev/null +++ b/queue-4.9/ib-device-convert-ib-comp-wq-to-be-cpu-bound.patch @@ -0,0 +1,55 @@ +From b7363e67b23e04c23c2a99437feefac7292a88bc Mon Sep 17 00:00:00 2001 +From: Sagi Grimberg +Date: Wed, 8 Mar 2017 22:03:17 +0200 +Subject: IB/device: Convert ib-comp-wq to be CPU-bound + +From: Sagi Grimberg + +commit b7363e67b23e04c23c2a99437feefac7292a88bc upstream. + +This workqueue is used by our storage target mode ULPs +via the new CQ API. Recent observations when working +with very high-end flash storage devices reveal that +UNBOUND workqueue threads can migrate between cpu cores +and even numa nodes (although some numa locality is accounted +for). + +While this attribute can be useful in some workloads, +it does not fit in very nicely with the normal +run-to-completion model we usually use in our target-mode +ULPs and the block-mq irq<->cpu affinity facilities. + +The whole block-mq concept is that the completion will +land on the same cpu where the submission was performed. +The fact that our submitter thread is migrating cpus +can break this locality. + +We assume that as a target mode ULP, we will serve multiple +initiators/clients and we can spread the load enough without +having to use unbound kworkers. + +Also, while we're at it, expose this workqueue via sysfs which +is harmless and can be useful for debug. + +Signed-off-by: Sagi Grimberg +Reviewed-by: Bart Van Assche -- +Signed-off-by: Doug Ledford +Cc: Raju Rangoju +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/core/device.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/infiniband/core/device.c ++++ b/drivers/infiniband/core/device.c +@@ -999,8 +999,7 @@ static int __init ib_core_init(void) + return -ENOMEM; + + ib_comp_wq = alloc_workqueue("ib-comp-wq", +- WQ_UNBOUND | WQ_HIGHPRI | WQ_MEM_RECLAIM, +- WQ_UNBOUND_MAX_ACTIVE); ++ WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_SYSFS, 0); + if (!ib_comp_wq) { + ret = -ENOMEM; + goto err; diff --git a/queue-4.9/series b/queue-4.9/series index 5f805e0c921..163a7e93dc3 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1 +1,2 @@ ipvs-fix-rtnl_lock-lockups-caused-by-start_sync_thread.patch +ib-device-convert-ib-comp-wq-to-be-cpu-bound.patch