diff options
author | Josef Bacik <josef@toxicpanda.com> | 2019-07-16 16:19:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-07-18 12:20:13 -0400 |
commit | d14a9b389a86a5154b704bc88ce8dd37c701456a (patch) | |
tree | 9eb9a85600a97d69d33fb701f240d7d3f58f90db | |
parent | 64e7ea875ef63b2801be7954cf7257d1bfccc266 (diff) |
rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule
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@redhat.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/blk-rq-qos.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index 69a0f0b77795..c450b8952eae 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c | |||
@@ -262,6 +262,7 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data, | |||
262 | } | 262 | } |
263 | io_schedule(); | 263 | io_schedule(); |
264 | has_sleeper = true; | 264 | has_sleeper = true; |
265 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
265 | } while (1); | 266 | } while (1); |
266 | finish_wait(&rqw->wait, &data.wq); | 267 | finish_wait(&rqw->wait, &data.wq); |
267 | } | 268 | } |