On 10/14/21 10:08 AM, Christoph Hellwig wrote: > On Thu, Oct 14, 2021 at 09:45:38AM -0600, Jens Axboe wrote: >> On 10/14/21 2:03 AM, Christoph Hellwig wrote: >>> On Wed, Oct 13, 2021 at 10:54:15AM -0600, Jens Axboe wrote: >>>> @@ -2404,6 +2406,11 @@ static int io_do_iopoll(struct io_ring_ctx *ctx, bool force_nonspin) >>>> struct kiocb *kiocb = &req->rw.kiocb; >>>> int ret; >>>> >>>> + if (!file) >>>> + file = kiocb->ki_filp; >>>> + else if (file != kiocb->ki_filp) >>>> + break; >>>> + >>> >>> Can you explain why we now can only poll for a single file (independent >>> of the fact that batching is used)? >> >> Different file may be on a different backend, it's just playing it >> safe and splitting it up. In practice it should not matter. > > Well, with file systems even the same file can land on different > devices. Maybe we need a cookie? > > Either way this should be commented as right now it looks pretty > arbitrary. I got rid of this and added a dev_id kind of cookie that gets matched on batched addition. -- Jens Axboe