Re: [PATCH liburing 1/2] io_uring_enter: add timeout support

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

 



Hi Jens,

On 2020/7/30 上午1:51, Jens Axboe wrote:
> On 7/29/20 4:10 AM, Jiufei Xue wrote:
>> Kernel can handle timeout when feature IORING_FEAT_GETEVENTS_TIMEOUT
>> supported. Add two new interfaces: io_uring_wait_cqes2(),
>> io_uring_wait_cqe_timeout2() for applications to use this feature.
> 
> Why add new new interfaces, when the old ones already pass in the
> timeout? Surely they could just use this new feature, instead of the
> internal timeout, if it's available?
> 
Applications use the old one may not call io_uring_submit() because
io_uring_wait_cqes() will do it. So I considered to add a new one.

>> diff --git a/src/include/liburing.h b/src/include/liburing.h
>> index 0505a4f..6176a63 100644
>> --- a/src/include/liburing.h
>> +++ b/src/include/liburing.h
>> @@ -56,6 +56,7 @@ struct io_uring {
>>  	struct io_uring_sq sq;
>>  	struct io_uring_cq cq;
>>  	unsigned flags;
>> +	unsigned features;
>>  	int ring_fd;
>>  };
> 
> This breaks the API, as it changes the size of the ring...
> 
Oh, yes, I haven't considering that before. So could I add this feature
bit to io_uring.flags. Any suggestion?

Thanks,
JIufei. 



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux