On 6/6/22 08:06, Hao Xu wrote:
On 6/6/22 14:57, Hao Xu wrote:
From: Hao Xu <howeyxu@xxxxxxxxxxx>
Make per entry lock for cancel_hash array, this reduces usage of
completion_lock and contension between cancel_hash entries.
v1->v2:
- Add per entry lock for poll/apoll task work code which was missed
in v1
- add an member in io_kiocb to track req's indice in cancel_hash
Tried to test it with many poll_add IOSQQE_ASYNC requests but turned out
that there is little conpletion_lock contention, so no visible change in
data. But I still think this may be good for cancel_hash access in some
real cases where completion lock matters.
Conceptually I don't mind it, but let me ask in what
circumstances you expect it to make a difference? And
what can we do to get favourable numbers? For instance,
how many CPUs io-wq was using?
--
Pavel Begunkov