diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-04 20:31:00 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-04 20:31:00 -0400 |
commit | e2c2c2445e23814bdaa8e4ab9bce8288a0f08f70 (patch) | |
tree | 312199c56d3e91c72a40fc12adb3180ecd1b167e | |
parent | 3e5f7c9224e763116ef28a6f518883b05a971148 (diff) | |
download | 4.8-rt-patches-e2c2c2445e23814bdaa8e4ab9bce8288a0f08f70.tar.gz |
blk-mq: trivial ctxt refreshrt-v4.7-2099-gd05d7f40791c
-rw-r--r-- | patches/block-mq-don-t-complete-requests-via-IPI.patch | 34 |
1 files changed, 20 insertions, 14 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 8412a0941fb61f..ab3a6f4c0e98f8 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 04c363099ee47fe5baf8a0951a398ea8651366a2 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 | 20 ++++++++++++++++++++ - include/linux/blk-mq.h | 1 + - include/linux/blkdev.h | 1 + - 4 files changed, 25 insertions(+) +diff --git a/block/blk-core.c b/block/blk-core.c +index 895a92f9ea62..04a7d3edfdfb 100644 --- a/block/blk-core.c +++ b/block/blk-core.c -@@ -125,6 +125,9 @@ void blk_rq_init(struct request_queue *q +@@ -125,6 +125,9 @@ void blk_rq_init(struct request_queue *q, struct request *rq) INIT_LIST_HEAD(&rq->queuelist); INIT_LIST_HEAD(&rq->timeout_list); @@ -25,9 +22,11 @@ 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 bbe37088b9f4..4e76bab012e3 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -196,6 +196,9 @@ static void blk_mq_rq_ctx_init(struct re +@@ -197,6 +197,9 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx, rq->resid_len = 0; rq->sense = NULL; @@ -37,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> INIT_LIST_HEAD(&rq->timeout_list); rq->timeout = 0; -@@ -323,6 +326,17 @@ void blk_mq_end_request(struct request * +@@ -324,6 +327,17 @@ void blk_mq_end_request(struct request *rq, int error) } EXPORT_SYMBOL(blk_mq_end_request); @@ -55,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void __blk_mq_complete_request_remote(void *data) { struct request *rq = data; -@@ -330,6 +344,8 @@ static void __blk_mq_complete_request_re +@@ -331,6 +345,8 @@ static void __blk_mq_complete_request_remote(void *data) rq->q->softirq_done_fn(rq); } @@ -64,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void blk_mq_ipi_complete_request(struct request *rq) { struct blk_mq_ctx *ctx = rq->mq_ctx; -@@ -346,10 +362,14 @@ static void blk_mq_ipi_complete_request( +@@ -347,10 +363,14 @@ static void blk_mq_ipi_complete_request(struct request *rq) shared = cpus_share_cache(cpu, ctx->cpu); if (cpu != ctx->cpu && !shared && cpu_online(ctx->cpu)) { @@ -79,9 +78,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 2498fdf3a503..2473b2cd2c75 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h -@@ -218,6 +218,7 @@ static inline u16 blk_mq_unique_tag_to_t +@@ -218,6 +218,7 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag) struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); @@ -89,6 +90,8 @@ 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); +diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h +index 48f05d768a53..6d51128b68bd 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -90,6 +90,7 @@ struct request { @@ -96,6 +99,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> union { struct call_single_data csd; + struct work_struct work; - unsigned long fifo_time; + u64 fifo_time; }; +-- +2.5.0 + |