summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-12-26 00:48:30 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2016-12-26 00:48:30 -0500
commit8d1b675aaae467861775fe21c2367c207029c05c (patch)
tree53a8401d68fbb1bb0946f38eff6519a2d710648b
parent2d4586ae8aa29e222b12b98beeaa219d521dc813 (diff)
download4.9-rt-patches-8d1b675aaae467861775fe21c2367c207029c05c.tar.gz
blk-mq.h: intermediary refresh for ctxt and whitespace
-rw-r--r--patches/block-mq-don-t-complete-requests-via-IPI.patch41
1 files changed, 27 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 ef9764e6c647fe..4300ed848562c5 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,24 @@
+From e1e3d438ee07a3a5a58f0728f5581f3ef59e3ed7 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(+)
+ block/blk-core.c | 3 +++
+ block/blk-mq.c | 20 ++++++++++++++++++++
+ include/linux/blk-mq.h | 2 +-
+ include/linux/blkdev.h | 1 +
+ 4 files changed, 25 insertions(+), 1 deletion(-)
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 58b163991c14..42494a6cbc28 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 +28,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 affbf13d4fa5..e9c3450b0d9a 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
-@@ -197,6 +197,9 @@ static void blk_mq_rq_ctx_init(struct re
+@@ -177,6 +177,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 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
INIT_LIST_HEAD(&rq->timeout_list);
rq->timeout = 0;
-@@ -379,6 +382,17 @@ void blk_mq_end_request(struct request *
+@@ -349,6 +352,17 @@ void blk_mq_end_request(struct request *rq, int error)
}
EXPORT_SYMBOL(blk_mq_end_request);
@@ -55,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void __blk_mq_complete_request_remote(void *data)
{
struct request *rq = data;
-@@ -386,6 +400,8 @@ static void __blk_mq_complete_request_re
+@@ -356,6 +370,8 @@ static void __blk_mq_complete_request_remote(void *data)
rq->q->softirq_done_fn(rq);
}
@@ -64,7 +69,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;
-@@ -402,10 +418,14 @@ static void blk_mq_ipi_complete_request(
+@@ -372,10 +388,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,16 +84,21 @@ 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 5daa0ef756dd..232800a2bc7f 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
-@@ -222,6 +222,7 @@ static inline u16 blk_mq_unique_tag_to_t
+@@ -219,7 +219,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);
+-
+void __blk_mq_complete_request_remote_work(struct work_struct *work);
-
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 c47c358ba052..797a06983c3e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -89,6 +89,7 @@ struct request {
@@ -99,3 +109,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
u64 fifo_time;
};
+--
+2.10.1
+