mbox series

[v3,0/2] liburing: multishot timeout support

Message ID 20230414225506.4108955-1-davidhwei@meta.com (mailing list archive)
Headers show
Series liburing: multishot timeout support | expand

Message

David Wei April 14, 2023, 10:55 p.m. UTC
Changes on the liburing side to support multishot timeouts.

Changes since v2:

* Edited man page for io_uring_prep_timeout.3

David Wei (2):
  liburing: add multishot timeout support
  liburing: update man page for multishot timeouts

 man/io_uring_prep_timeout.3     |   7 +
 src/include/liburing/io_uring.h |   1 +
 test/timeout.c                  | 263 ++++++++++++++++++++++++++++++++
 3 files changed, 271 insertions(+)

Comments

Jens Axboe April 19, 2023, 1:43 a.m. UTC | #1
On 4/14/23 4:55?PM, David Wei wrote:
> Changes on the liburing side to support multishot timeouts.
> 
> Changes since v2:
> 
> * Edited man page for io_uring_prep_timeout.3
> 
> David Wei (2):
>   liburing: add multishot timeout support
>   liburing: update man page for multishot timeouts
> 
>  man/io_uring_prep_timeout.3     |   7 +
>  src/include/liburing/io_uring.h |   1 +
>  test/timeout.c                  | 263 ++++++++++++++++++++++++++++++++
>  3 files changed, 271 insertions(+)

I applied this, but there's an issue in that the tests don't just skip
if the kernel doesn't support multishot. Tests for liburing need to
accept that the feature isn't available on older kernels. Generally this
is done by the first test setting 'no_timeout_mshot = true' or something
like that, and then subsequent ones just returning T_SETUP_SKIP if
no_timeout_mshot == true and whatever calls the test not failing if
T_SETUP_SKIP is returned.

Would be great if you could send a followup patch against the current
liburing -git that does that. Thanks!
Jens Axboe April 19, 2023, 2:16 a.m. UTC | #2
On Fri, 14 Apr 2023 15:55:04 -0700, David Wei wrote:
> Changes on the liburing side to support multishot timeouts.
> 
> Changes since v2:
> 
> * Edited man page for io_uring_prep_timeout.3
> 
> David Wei (2):
>   liburing: add multishot timeout support
>   liburing: update man page for multishot timeouts
> 
> [...]

Applied, thanks!

[1/2] liburing: add multishot timeout support
      (no commit info)
[2/2] liburing: update man page for multishot timeouts
      (no commit info)

Best regards,
David Wei April 19, 2023, 6:56 p.m. UTC | #3
On 18/04/2023 18:43, Jens Axboe wrote:
> > 
> On 4/14/23 4:55?PM, David Wei wrote:
>> Changes on the liburing side to support multishot timeouts.
>>
>> Changes since v2:
>>
>> * Edited man page for io_uring_prep_timeout.3
>>
>> David Wei (2):
>>   liburing: add multishot timeout support
>>   liburing: update man page for multishot timeouts
>>
>>  man/io_uring_prep_timeout.3     |   7 +
>>  src/include/liburing/io_uring.h |   1 +
>>  test/timeout.c                  | 263 ++++++++++++++++++++++++++++++++
>>  3 files changed, 271 insertions(+)
> 
> I applied this, but there's an issue in that the tests don't just skip
> if the kernel doesn't support multishot. Tests for liburing need to
> accept that the feature isn't available on older kernels. Generally this
> is done by the first test setting 'no_timeout_mshot = true' or something
> like that, and then subsequent ones just returning T_SETUP_SKIP if
> no_timeout_mshot == true and whatever calls the test not failing if
> T_SETUP_SKIP is returned.
> 
> Would be great if you could send a followup patch against the current
> liburing -git that does that. Thanks!

Ah I didn't realise, thanks. Will do this and submit a new version.