diff options
author | Jens Axboe <axboe@fb.com> | 2016-11-14 13:03:03 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-17 13:34:57 -0700 |
commit | 64f1c21e86f7fe63337b5c23c129de3ec506431d (patch) | |
tree | c5cfcf1875785d425b7da3f9d47388d39c9e7793 /include | |
parent | 06426adf072bca62ac31ea396ff2159a34f276c2 (diff) | |
download | linux-64f1c21e86f7fe63337b5c23c129de3ec506431d.tar.bz2 |
blk-mq: make the polling code adaptive
The previous commit introduced the hybrid sleep/poll mode. Take
that one step further, and use the completion latencies to
automatically sleep for half the mean completion time. This is
a good approximation.
This changes the 'io_poll_delay' sysfs file a bit to expose the
various options. Depending on the value, the polling code will
behave differently:
-1 Never enter hybrid sleep mode
0 Use half of the completion mean for the sleep delay
>0 Use this specific value as the sleep delay
Signed-off-by: Jens Axboe <axboe@fb.com>
Tested-By: Stephen Bates <sbates@raithlin.com>
Reviewed-By: Stephen Bates <sbates@raithlin.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 37ed4ea705c8..85699bc90a51 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -509,7 +509,7 @@ struct request_queue { unsigned int request_fn_active; unsigned int rq_timeout; - unsigned int poll_nsec; + int poll_nsec; struct timer_list timeout; struct work_struct timeout_work; struct list_head timeout_list; |