Re: [PATCH 02/22] block: add REQ_HIPRI_ASYNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/21/18 4:20 AM, Christoph Hellwig wrote:
> On Tue, Dec 18, 2018 at 08:42:10AM -0700, Jens Axboe wrote:
>> For the upcoming async polled IO, we can't sleep allocating requests.
>> If we do, then we introduce a deadlock where the submitter already
>> has async polled IO in-flight, but can't wait for them to complete
>> since polled requests must be active found and reaped.
> 
> So two comments here.  First I think after the next -rc1 we really
> need to rename REQ_HIPRI to REQ_POLLED.  Unlike the iocb hipri flag
> which is an advice to treat this I/O as urgent REQ_POLLED is a hard
> charaterisation and having the hipri name is badly misnamed for that.

Agree, it doesn't make a lot of sense to not call it _POLLED.

> Second I retract my suggestion to add this _ASYNC variant, as it seems
> to cause more confusion than it helps.  I think instead we want
> a helper like this:
> 
> static void bio_set_polled(struct bio *bio, struct kiocb *kiocb)
> {
> 	bio->bi_opf |= REQ_POLLED;
> 	if (!is_sync_kiocb(kiocb)
> 		bio->bi_opf |= REQ_NOWAIT;
> }
> 
> maybe plus comments to better indicate the intentional and consolidate
> the is_sync check.

I'm fine with that, I'll do the cleanup.

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux