mbox series

[liburing,v2,0/3] single-issuer and poll benchmark

Message ID cover.1655219150.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series single-issuer and poll benchmark | expand

Message

Pavel Begunkov June 14, 2022, 3:27 p.m. UTC
Add some tests to check the kernel enforcing single-issuer right, and
add a simple poll benchmark, might be useful if we do poll changes.

v2:
    remove copy-pasted test comments
    fix poll-bench 'argc' build problem

Pavel Begunkov (3):
  io_uring: update headers with IORING_SETUP_SINGLE_ISSUER
  examples: add a simple single-shot poll benchmark
  tests: test IORING_SETUP_SINGLE_ISSUER

 examples/Makefile               |   3 +-
 examples/poll-bench.c           | 101 +++++++++++++++++++
 src/include/liburing/io_uring.h |   5 +-
 test/Makefile                   |   1 +
 test/single-issuer.c            | 169 ++++++++++++++++++++++++++++++++
 5 files changed, 277 insertions(+), 2 deletions(-)
 create mode 100644 examples/poll-bench.c
 create mode 100644 test/single-issuer.c

Comments

Jens Axboe June 14, 2022, 3:30 p.m. UTC | #1
On 6/14/22 9:27 AM, Pavel Begunkov wrote:
> Add some tests to check the kernel enforcing single-issuer right, and
> add a simple poll benchmark, might be useful if we do poll changes.

Should we add a benchmark/ or something directory rather than use
examples/ ?

I know Dylan was looking at that at one point. I don't feel too
strongly, as long as it doesn't go into test/.
Pavel Begunkov June 14, 2022, 3:48 p.m. UTC | #2
On 6/14/22 16:30, Jens Axboe wrote:
> On 6/14/22 9:27 AM, Pavel Begunkov wrote:
>> Add some tests to check the kernel enforcing single-issuer right, and
>> add a simple poll benchmark, might be useful if we do poll changes.
> 
> Should we add a benchmark/ or something directory rather than use
> examples/ ?
> 
> I know Dylan was looking at that at one point. I don't feel too
> strongly, as long as it doesn't go into test/.

I don't care much myself, I can respin it once (if) the kernel
side is queued.
Jens Axboe June 14, 2022, 3:51 p.m. UTC | #3
On 6/14/22 9:48 AM, Pavel Begunkov wrote:
> On 6/14/22 16:30, Jens Axboe wrote:
>> On 6/14/22 9:27 AM, Pavel Begunkov wrote:
>>> Add some tests to check the kernel enforcing single-issuer right, and
>>> add a simple poll benchmark, might be useful if we do poll changes.
>>
>> Should we add a benchmark/ or something directory rather than use
>> examples/ ?
>>
>> I know Dylan was looking at that at one point. I don't feel too
>> strongly, as long as it doesn't go into test/.
> 
> I don't care much myself, I can respin it once (if) the kernel
> side is queued.

I'm leaning towards just using examples/ - but maybe Dylan had some
reasoning for the new directory. CC'ed.
Dylan Yudaken June 14, 2022, 6:23 p.m. UTC | #4
On Tue, 2022-06-14 at 09:51 -0600, Jens Axboe wrote:
> On 6/14/22 9:48 AM, Pavel Begunkov wrote:
> > On 6/14/22 16:30, Jens Axboe wrote:
> > > On 6/14/22 9:27 AM, Pavel Begunkov wrote:
> > > > Add some tests to check the kernel enforcing single-issuer
> > > > right, and
> > > > add a simple poll benchmark, might be useful if we do poll
> > > > changes.
> > > 
> > > Should we add a benchmark/ or something directory rather than use
> > > examples/ ?
> > > 
> > > I know Dylan was looking at that at one point. I don't feel too
> > > strongly, as long as it doesn't go into test/.
> > 
> > I don't care much myself, I can respin it once (if) the kernel
> > side is queued.
> 
> I'm leaning towards just using examples/ - but maybe Dylan had some
> reasoning for the new directory. CC'ed.
> 

I wanted to have some common framework for benchmarks to make it easy
to write new ones and get some nice numbers. In that case it would make
sense for them to be in one place.

But I haven't finished it yet, so probably for now examples/ is best
and if/when I finish it I can port these over.
Hao Xu June 15, 2022, 6:24 a.m. UTC | #5
On 6/15/22 02:23, Dylan Yudaken wrote:
> On Tue, 2022-06-14 at 09:51 -0600, Jens Axboe wrote:
>> On 6/14/22 9:48 AM, Pavel Begunkov wrote:
>>> On 6/14/22 16:30, Jens Axboe wrote:
>>>> On 6/14/22 9:27 AM, Pavel Begunkov wrote:
>>>>> Add some tests to check the kernel enforcing single-issuer
>>>>> right, and
>>>>> add a simple poll benchmark, might be useful if we do poll
>>>>> changes.
>>>>
>>>> Should we add a benchmark/ or something directory rather than use
>>>> examples/ ?
>>>>
>>>> I know Dylan was looking at that at one point. I don't feel too
>>>> strongly, as long as it doesn't go into test/.
>>>
>>> I don't care much myself, I can respin it once (if) the kernel
>>> side is queued.
>>
>> I'm leaning towards just using examples/ - but maybe Dylan had some
>> reasoning for the new directory. CC'ed.
>>
> 
> I wanted to have some common framework for benchmarks to make it easy
> to write new ones and get some nice numbers. In that case it would make
> sense for them to be in one place.

This sounds great, it's really nice to have a series of standard
performance tests rather than temporary tests created along with new
kernel patches. A framework is something nicer. Actually there are
people doing this though just a simple one, FWIW:

https://gitee.com/anolis/perf-test-for-io_uring

> 
> But I haven't finished it yet, so probably for now examples/ is best
> and if/when I finish it I can port these over.
>