From: Hao Xu <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Cc: Pavel Begunkov <[email protected]>
Subject: Re: [PATCH 2/2] io_uring: switch cancel_hash to use per list spinlock
Date: Mon, 30 May 2022 21:33:34 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 5/30/22 00:25, Jens Axboe wrote:
> On 5/29/22 10:20 AM, Hao Xu wrote:
>> From: Hao Xu <[email protected]>
>>
>> From: Hao Xu <[email protected]>
>>
>> Use per list lock for cancel_hash, this removes some completion lock
>> invocation and remove contension between different cancel_hash entries
>
> Interesting, do you have any numbers on this?
>
> Also, I'd make a hash bucket struct:
>
> struct io_hash_bucket {
> spinlock_t lock;
> struct hlist_head list;
> };
>
> rather than two separate structs, that'll have nicer memory locality too
> and should further improve it. Could be done as a prep patch with the
> old locking in place, making the end patch doing the per-bucket lock
> simpler as well.
>
> Hmm?
>
I've done a v2 here, also a test which issues async poll densely to
make high frequency cancel_hash[] visits. But I won't have a real box
with big number of cpu processors which is suitable for testing until
tomorrow, so I'd test it tomorrow.
https://github.com/HowHsu/linux/commits/for-5.20/io_uring_hash_lock
https://github.com/HowHsu/liburing/commit/b9fb4d20a5dfe7c7bd62fe36c37aea3b261d4499
prev parent reply other threads:[~2022-05-30 13:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 16:19 [PATCH 0/2] cancel_hash per entry lock Hao Xu
2022-05-29 16:19 ` [PATCH 1/2] io_uring: add an argument for io_poll_disarm() Hao Xu
2022-05-29 16:20 ` [PATCH 2/2] io_uring: switch cancel_hash to use per list spinlock Hao Xu
2022-05-29 16:25 ` Jens Axboe
2022-05-29 18:07 ` Hao Xu
2022-05-29 18:40 ` Jens Axboe
2022-05-29 22:50 ` Pavel Begunkov
2022-05-29 23:34 ` Jens Axboe
2022-05-30 0:18 ` Pavel Begunkov
2022-05-30 6:52 ` Hao Xu
2022-05-30 9:35 ` Pavel Begunkov
2022-05-30 6:38 ` Hao Xu
2022-05-30 6:59 ` Hao Xu
2022-05-30 9:39 ` Pavel Begunkov
2022-05-30 13:33 ` Hao Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox