Skip to content

Commit

Permalink
rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josef Bacik authored and Jens Axboe committed Jul 18, 2019
1 parent 64e7ea8 commit d14a9b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-rq-qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,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);
}
Expand Down

0 comments on commit d14a9b3

Please sign in to comment.