]> git.baikalelectronics.ru Git - kernel.git/commit
rq-qos: don't reset has_sleepers on spurious wakeups
authorJosef Bacik <josef@toxicpanda.com>
Tue, 16 Jul 2019 20:19:27 +0000 (16:19 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 18 Jul 2019 16:20:13 +0000 (10:20 -0600)
commitc65cc427f2c7030fe65236cce9530a221226ee31
treeb14ba8e125ed21dbfcb64280894995436258f505
parent46ba3cd1cdcb7c46ffd0a807e2b9d5e77ea2951b
rq-qos: don't reset has_sleepers on spurious wakeups

If we raced with somebody else getting an inflight counter we could fail
to get an inflight counter with no sleepers on the list, and thus need
to go to sleep.  In this case has_sleepers should be true because we are
now relying on the waker to get our inflight counter for us.  And in the
case of spurious wakeups we'd still want this to be the case.  So set
has_sleepers to true if we went to sleep to make sure we're woken up the
proper way.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-rq-qos.c