Re: [PATCH 09/22] aio: add submission side request cache

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

 



On 12/27/18 6:56 AM, Christoph Hellwig wrote:
>> +/*
>> + * After the iocb has been issued, it's safe to be found on the poll list.
>> + * Adding the kiocb to the list AFTER submission ensures that we don't
>> + * find it from a io_getevents() thread before the issuer is done accessing
>> + * the kiocb cookie.
>> + */
>> +static void aio_iopoll_iocb_issued(struct aio_submit_state *state,
>> +				   struct aio_kiocb *kiocb)
>> +{
>> +	if (!state || !IS_ENABLED(CONFIG_BLOCK))
>> +		aio_iopoll_iocb_add_list(kiocb);
> 
> This still looks odd to me.  Why would be make a batch or not batch
> decision based on CONFIG_BLOCK availability?  Either batching is safe
> for all ops, in which case we should always enabled it, or it only makes
> sense for block devices / block backed filesystem in which case we need
> a per-operation check.

It is safe for any device, but ideally we want the schedule flush to
be enabled to not sit on requests if we block.

The alternative is to make the plug cb handling available with
!CONFIG_BLOCK and not need these checks.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux