On 11/14/2016 12:43 PM, Omar Sandoval wrote: ,9 +2539,10 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q,
* This will be replaced with the stats tracking code, using * 'avg_completion_time / 2' as the pre-sleep target. */ - kt = ktime_set(0, q->poll_nsec); + kt = ktime_set(0, nsecs);- hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + mode = HRTIMER_MODE_REL; + hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, mode); hrtimer_set_expires(&hs.timer, kt); hrtimer_init_sleeper(&hs, current); @@ -2487,10 +2550,11 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, if (test_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags)) break; set_current_state(TASK_UNINTERRUPTIBLE); - hrtimer_start_expires(&hs.timer, HRTIMER_MODE_REL); + hrtimer_start_expires(&hs.timer, mode); if (hs.task) io_schedule(); hrtimer_cancel(&hs.timer); + mode = HRTIMER_MODE_ABS; } while (hs.task && !signal_pending(current));This fix should be folded into patch 2.
Good point, I'll do that. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
