[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5762c14d-eb4e-b601-a15f-71ef5fbfec3d@fb.com>
Date: Thu, 3 Nov 2016 07:41:28 -0600
From: Jens Axboe <axboe@...com>
To: Ming Lei <tom.leiming@...il.com>
CC: Jens Axboe <axboe@...nel.dk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 3/4] blk-mq: implement hybrid poll mode for sync O_DIRECT
On 11/03/2016 06:27 AM, Ming Lei wrote:
> On Wed, Nov 2, 2016 at 5:05 AM, Jens Axboe <axboe@...com> wrote:
>> This patch enables a hybrid polling mode. Instead of polling after IO
>> submission, we can induce an artificial delay, and then poll after that.
>> For example, if the IO is presumed to complete in 8 usecs from now, we
>> can sleep for 4 usecs, wake up, and then do our polling. This still puts
>
> I guess in reality it isn't easy to figure a perfect poll time:
>
> - for one driver, different CPU and different drive/disk may cause different
> completion time
>
> - for requests with different size, the completion time can be different too
>
> Is there one way to figure out the poll time automatically?
Yes, it's not easy to figure out the perfect time, the point is to try
and make a guess that's a bit better than the current "let's poll the
whole time". I suspect that for most real world cases, you are going to
be polling for smallish IO of roughly the same size. Hence the stats
should be useful.
But we could extend the tracking a bit and make it smarter.
--
Jens Axboe
Powered by blists - more mailing lists