summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-16 08:37:34 -0700
committerJens Axboe <axboe@kernel.dk>2018-11-19 08:34:49 -0700
commit849a370016a5489c49253338507ee6cc4a08df4b (patch)
tree3e8794bb4312b0fa73e3092849b8b6e163437a2d /block/blk-mq.c
parenta4668d9ba4be1ca9f4a39798ba3419fdfef0750d (diff)
downloadlinux-0-day-849a370016a5489c49253338507ee6cc4a08df4b.tar.gz
linux-0-day-849a370016a5489c49253338507ee6cc4a08df4b.tar.xz
block: avoid ordered task state change for polled IO
For the core poll helper, the task state setting don't need to imply any atomics, as it's the current task itself that is being modified and we're not going to sleep. For IRQ driven, the wakeup path have the necessary barriers to not need us using the heavy handed version of the task state setting. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 32b246ed44c0a..7fc4abb4cc36e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3331,12 +3331,12 @@ static bool __blk_mq_poll(struct blk_mq_hw_ctx *hctx, struct request *rq)
ret = q->mq_ops->poll(hctx, rq->tag);
if (ret > 0) {
hctx->poll_success++;
- set_current_state(TASK_RUNNING);
+ __set_current_state(TASK_RUNNING);
return true;
}
if (signal_pending_state(state, current))
- set_current_state(TASK_RUNNING);
+ __set_current_state(TASK_RUNNING);
if (current->state == TASK_RUNNING)
return true;