diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
commit | b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch) | |
tree | 1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch | |
parent | Adding upstream version 5.10.209. (diff) | |
download | linux-debian.tar.xz linux-debian.zip |
Adding debian version 5.10.209-2.debian/5.10.209-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch')
-rw-r--r-- | debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch b/debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch new file mode 100644 index 000000000..8623209ab --- /dev/null +++ b/debian/patches-rt/0063-blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch @@ -0,0 +1,48 @@ +From f7d87d26b4c9bfd083484542889f392867c1c85b Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 4 Dec 2020 20:13:54 +0100 +Subject: [PATCH 063/323] blk-mq: Don't complete on a remote CPU in force + threaded mode +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +With force threaded interrupts enabled, raising softirq from an SMP +function call will always result in waking the ksoftirqd thread. This is +not optimal given that the thread runs at SCHED_OTHER priority. + +Completing the request in hard IRQ-context on PREEMPT_RT (which enforces +the force threaded mode) is bad because the completion handler may +acquire sleeping locks which violate the locking context. + +Disable request completing on a remote CPU in force threaded mode. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Reviewed-by: Christoph Hellwig <hch@lst.de> +Reviewed-by: Daniel Wagner <dwagner@suse.de> +Signed-off-by: Jens Axboe <axboe@kernel.dk> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + block/blk-mq.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/block/blk-mq.c b/block/blk-mq.c +index e153a36c9ba3..cc41373cf346 100644 +--- a/block/blk-mq.c ++++ b/block/blk-mq.c +@@ -652,6 +652,14 @@ static inline bool blk_mq_complete_need_ipi(struct request *rq) + if (!IS_ENABLED(CONFIG_SMP) || + !test_bit(QUEUE_FLAG_SAME_COMP, &rq->q->queue_flags)) + return false; ++ /* ++ * With force threaded interrupts enabled, raising softirq from an SMP ++ * function call will always result in waking the ksoftirqd thread. ++ * This is probably worse than completing the request on a different ++ * cache domain. ++ */ ++ if (force_irqthreads) ++ return false; + + /* same CPU or cache domain? Complete locally */ + if (cpu == rq->mq_ctx->cpu || +-- +2.43.0 + |