[Devel] [PATCH RH7 11/12] rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Sep 29 14:30:11 MSK 2022


From: Josef Bacik <josef at toxicpanda.com>

In case we get a spurious wakeup we need to make sure to re-set
ourselves to TASK_UNINTERRUPTIBLE so we don't busy wait.

Reviewed-by: Oleg Nesterov <oleg at redhat.com>
Signed-off-by: Josef Bacik <josef at toxicpanda.com>
Signed-off-by: Jens Axboe <axboe at kernel.dk>

Changes when porting to vz7:
- original patch is patching block/blk-rq-qos.c:rq_qos_wait, but in vz7
  similar hunk is in block/blk-wbt.c:__wbt_wait

https://jira.sw.ru/browse/PSBM-141883
(cherry picked from commit d14a9b389a86a5154b704bc88ce8dd37c701456a)
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 block/blk-wbt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index f3c0841f009a..4c5b6899db71 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -599,6 +599,7 @@ static void __wbt_wait(struct rq_wb *rwb, enum wbt_flags wb_acct,
 			spin_lock_irq(lock);
 
 		has_sleeper = true;
+		set_current_state(TASK_UNINTERRUPTIBLE);
 	} while (1);
 
 	finish_wait(&rqw->wait, &data.wq);
-- 
2.37.1



More information about the Devel mailing list