Re: [PATCH v2 04/24] io_uring: use slist for completion batching

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

 



On 9/28/21 3:41 AM, Pavel Begunkov wrote:
> On 9/26/21 7:57 AM, Hao Xu wrote:
>> 在 2021/9/25 上午4:59, Pavel Begunkov 写道:
>>> Currently we collect requests for completion batching in an array.
>>> Replace them with a singly linked list. It's as fast as arrays but
>>> doesn't take some much space in ctx, and will be used in future patches.
>>>
>>> Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
>>> ---
>>>   fs/io_uring.c | 52 +++++++++++++++++++++++++--------------------------
>>>   1 file changed, 25 insertions(+), 27 deletions(-)
>>>
>>> diff --git a/fs/io_uring.c b/fs/io_uring.c
>>> index 9c14e9e722ba..9a76c4f84311 100644
>>> --- a/fs/io_uring.c
>>> +++ b/fs/io_uring.c
>>> @@ -322,8 +322,8 @@ struct io_submit_state {
>>>       /*
>>>        * Batch completion logic
>>>        */
>>> -    struct io_kiocb        *compl_reqs[IO_COMPL_BATCH];
>>> -    unsigned int        compl_nr;
>>> +    struct io_wq_work_list    compl_reqs;
>> Will it be better to rename struct io_wq_work_list to something more
>> generic, io_wq_work_list is a bit confused, we are now using this
>> type of linked list (stack as well) for various aim, not just to link
>> iowq works.
> 
> Was thinking about it, e.g. io_slist, but had been already late --
> lots of conflicts and a good chance to add a couple of extra bugs
> on rebase. I think we can do it afterward (if ever considering
> it troubles backporting)

Agree with both of you - it should be renamed, but at the same time it's
also really annoying with trivial conflicts for eg stable patches due to
random renaming. I was bit by this again just recently, function rename
in that case.

So let's keep the name for now, and once we have some quiet time, we
can get that done.

-- 
Jens Axboe




[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