diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2015-06-01 19:35:09 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-06-01 22:09:03 -0400 |
commit | 419c21a3b6275d40a10901f700efcd40515b6db6 (patch) | |
tree | d9c7c2de841bc87fb5f43a12f89052f649f22fc4 /drivers/block | |
parent | 42483228d4c019ffc86b8dbea7dfbc3f9566fe7e (diff) |
null_blk: prevent timer handler running on a different CPU where started
When irqmode=2 (IRQ completion handler is timer), timer handler should
be called on the same CPU where the timer has been started.
Since completion_queues are per-cpu and the completion handler only
touches completion_queue for local CPU, we need to prevent the handler
from running on a different CPU where the timer has been started.
Otherwise, the IO cannot be completed until another completion handler
is executed on that CPU.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 65cd61a4145e..6f0a58e7613d 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c | |||
@@ -257,7 +257,7 @@ static void null_cmd_end_timer(struct nullb_cmd *cmd) | |||
257 | if (llist_add(&cmd->ll_list, &cq->list)) { | 257 | if (llist_add(&cmd->ll_list, &cq->list)) { |
258 | ktime_t kt = ktime_set(0, completion_nsec); | 258 | ktime_t kt = ktime_set(0, completion_nsec); |
259 | 259 | ||
260 | hrtimer_start(&cq->timer, kt, HRTIMER_MODE_REL); | 260 | hrtimer_start(&cq->timer, kt, HRTIMER_MODE_REL_PINNED); |
261 | } | 261 | } |
262 | 262 | ||
263 | put_cpu(); | 263 | put_cpu(); |