]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule
authorJosef Bacik <josef@toxicpanda.com>
Tue, 16 Jul 2019 20:19:28 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:11:00 +0000 (10:11 +0200)
[ Upstream commit d14a9b389a86a5154b704bc88ce8dd37c701456a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-rq-qos.c

index e5d75280b431ea6700ae8be9f54e98f912e22073..e3ab75e4df9eac7f880a9d7b73d2beec08b45286 100644 (file)
@@ -261,6 +261,7 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data,
                }
                io_schedule();
                has_sleeper = true;
+               set_current_state(TASK_UNINTERRUPTIBLE);
        } while (1);
        finish_wait(&rqw->wait, &data.wq);
 }