Skip to content

Commit

Permalink
linux 5.15.y: sched/alt: [Sync] sched/core: Always flush pending blk_…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tk-Glitch committed Oct 4, 2022
1 parent b4bd161 commit 53ce492
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions linux-tkg-patches/5.15/0009-prjc_v5.15-r1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9893,3 +9893,34 @@ index f2b9e686d6a69c07f54c2cae36f7ce0ab70f9cb2..55c2a4c0cb845580c97e4adf07a34646
+
extern void swake_up_all_locked(struct swait_queue_head *q);
extern void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait);

From 3728c383c5031dce5ae0f5ea53fc47afba71270f Mon Sep 17 00:00:00 2001
From: Juuso Alasuutari <juuso.alasuutari@gmail.com>
Date: Sun, 14 Aug 2022 18:19:09 +0300
Subject: [PATCH 01/10] sched/alt: [Sync] sched/core: Always flush pending
blk_plug

---
kernel/sched/alt_core.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
index 588c7b983e3ba..8a6aa5b7279d3 100644
--- a/kernel/sched/alt_core.c
+++ b/kernel/sched/alt_core.c
@@ -4663,8 +4663,12 @@ static inline void sched_submit_work(struct task_struct *tsk)
io_wq_worker_sleeping(tsk);
}

- if (tsk_is_pi_blocked(tsk))
- return;
+ /*
+ * spinlock and rwlock must not flush block requests. This will
+ * deadlock if the callback attempts to acquire a lock which is
+ * already acquired.
+ */
+ SCHED_WARN_ON(current->__state & TASK_RTLOCK_WAIT);

/*
* If we are going to sleep and we have plugged IO queued,

0 comments on commit 53ce492

Please sign in to comment.