diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-10-02 02:09:02 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-10-02 02:09:02 -0400 |
commit | ed360f64213efb2610e52a386c70c0df6006ae8d (patch) | |
tree | 4b501bcc8068a1d0e72f0023f8be3322f77b8527 | |
parent | 9f63d0a7d044b52f5341c8d01ae35008ef28211c (diff) | |
download | 4.12-rt-patches-ed360f64213efb2610e52a386c70c0df6006ae8d.tar.gz |
refresh block-mq-don-t-complete-requests-via-IPI.patchrt-v4.11-333-g694752922b12
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | patches/block-mq-don-t-complete-requests-via-IPI.patch | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/patches/block-mq-don-t-complete-requests-via-IPI.patch b/patches/block-mq-don-t-complete-requests-via-IPI.patch index bb62787879f255..b6fd339d6c9187 100644 --- a/patches/block-mq-don-t-complete-requests-via-IPI.patch +++ b/patches/block-mq-don-t-complete-requests-via-IPI.patch @@ -1,21 +1,18 @@ +From cf4699a454733b148e90e636f3bdc3fb9b7529a9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Jan 2015 15:10:08 +0100 -Subject: block/mq: don't complete requests via IPI +Subject: [PATCH] block/mq: don't complete requests via IPI The IPI runs in hardirq context and there are sleeping locks. This patch moves the completion into a workqueue. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - block/blk-core.c | 3 +++ - block/blk-mq.c | 24 ++++++++++++++++++++++++ - include/linux/blk-mq.h | 2 +- - include/linux/blkdev.h | 3 +++ - 4 files changed, 31 insertions(+), 1 deletion(-) +diff --git a/block/blk-core.c b/block/blk-core.c +index fd444cb11505..259e9bd12e64 100644 --- a/block/blk-core.c +++ b/block/blk-core.c -@@ -116,6 +116,9 @@ void blk_rq_init(struct request_queue *q +@@ -116,6 +116,9 @@ void blk_rq_init(struct request_queue *q, struct request *rq) INIT_LIST_HEAD(&rq->queuelist); INIT_LIST_HEAD(&rq->timeout_list); @@ -25,10 +22,12 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> rq->cpu = -1; rq->q = q; rq->__sector = (sector_t) -1; +diff --git a/block/blk-mq.c b/block/blk-mq.c +index abe6579b43ec..3beaa45dfcfd 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -213,6 +213,9 @@ void blk_mq_rq_ctx_init(struct request_q - rq->errors = 0; +@@ -232,6 +232,9 @@ void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx, + /* tag was already set */ rq->extra_len = 0; +#ifdef CONFIG_PREEMPT_RT_FULL @@ -37,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> INIT_LIST_HEAD(&rq->timeout_list); rq->timeout = 0; -@@ -395,6 +398,17 @@ void blk_mq_end_request(struct request * +@@ -415,6 +418,17 @@ void blk_mq_end_request(struct request *rq, int error) } EXPORT_SYMBOL(blk_mq_end_request); @@ -55,16 +54,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void __blk_mq_complete_request_remote(void *data) { struct request *rq = data; -@@ -402,6 +416,8 @@ static void __blk_mq_complete_request_re +@@ -422,6 +436,8 @@ static void __blk_mq_complete_request_remote(void *data) rq->q->softirq_done_fn(rq); } +#endif + - static void blk_mq_ipi_complete_request(struct request *rq) + static void __blk_mq_complete_request(struct request *rq) { struct blk_mq_ctx *ctx = rq->mq_ctx; -@@ -418,10 +434,18 @@ static void blk_mq_ipi_complete_request( +@@ -445,10 +461,18 @@ static void __blk_mq_complete_request(struct request *rq) shared = cpus_share_cache(cpu, ctx->cpu); if (cpu != ctx->cpu && !shared && cpu_online(ctx->cpu)) { @@ -83,9 +82,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } else { rq->q->softirq_done_fn(rq); } +diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h +index f3e5e1de1bdb..6521ceb12818 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h -@@ -218,7 +218,7 @@ static inline u16 blk_mq_unique_tag_to_t +@@ -222,7 +222,7 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag) return unique_tag & BLK_MQ_UNIQUE_TAG_MASK; } @@ -94,9 +95,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int blk_mq_request_started(struct request *rq); void blk_mq_start_request(struct request *rq); void blk_mq_end_request(struct request *rq, int error); +diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h +index 83d28623645f..835dbbb62223 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h -@@ -128,6 +128,9 @@ typedef __u32 __bitwise req_flags_t; +@@ -133,6 +133,9 @@ typedef __u32 __bitwise req_flags_t; */ struct request { struct list_head queuelist; @@ -106,3 +109,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> union { struct call_single_data csd; u64 fifo_time; +-- +2.1.4 + |