]> git.karo-electronics.de Git - linux-beck.git/commit
blk-mq: make the polling code adaptive
authorJens Axboe <axboe@fb.com>
Mon, 14 Nov 2016 20:03:03 +0000 (13:03 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 17 Nov 2016 20:34:57 +0000 (13:34 -0700)
commit64f1c21e86f7fe63337b5c23c129de3ec506431d
treec5cfcf1875785d425b7da3f9d47388d39c9e7793
parent06426adf072bca62ac31ea396ff2159a34f276c2
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>
block/blk-mq.c
block/blk-sysfs.c
include/linux/blkdev.h