From: Yu Kuai yukuai3@huawei.com
hulk inclusion category: performance bugzilla: 187597, https://gitee.com/openeuler/kernel/issues/I5QK5M CVE: NA
--------------------------------
Try to improve performance for raid when user issues io concurrently from multiple nodes.
Signed-off-by: Yu Kuai yukuai3@huawei.com --- drivers/md/md.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9c94190769b8..f5f90e6d51e4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -66,6 +66,7 @@ #include <linux/raid/md_u.h> #include <linux/slab.h> #include <linux/percpu-refcount.h> +#include <linux/arch_topology.h>
#include <trace/events/block.h> #include "md.h" @@ -5442,6 +5443,10 @@ static int md_alloc(dev_t dev, char *name) goto abort; mddev->queue->queuedata = mddev;
+ arch_get_preferred_sibling_mask(1, &mddev->queue->dispatch_async_cpus); + if (cpumask_first(&mddev->queue->dispatch_async_cpus) < nr_cpu_ids) + blk_queue_flag_set(QUEUE_FLAG_DISPATCH_ASYNC, mddev->queue); + blk_queue_make_request(mddev->queue, md_make_request); blk_set_stacking_limits(&mddev->queue->limits);