Re: [PATCH v5 1/3] genirq: Use hlist for managing resend handlers

From: Marc Zyngier
Date: Tue May 30 2023 - 03:28:38 EST


On Tue, 30 May 2023 02:44:05 +0100,
"Liao, Chang" <liaochang1@xxxxxxxxxx> wrote:
>
> >> What is the benefit of using hlist here? If you want to enjoy the
> >> low latency of querying elements by key, you must define a hlist table
> >> with a reasonable number of buckets. Otherwise, I don't think the time
> >> complexity of hlist is better than a regular double-linked list, right?
> >
> > You do realise that the list is processed in order, one element after
> > the other, without ever querying any arbitrary element? Have you read
> > the code?
>
> Yes, so i *wonder* why not use regular a linked-list here if no need to do
> arbitrary querying. I have no doubt the idea of these changes are sound,
> just curious about the data structure used to maintain resend IRQs.

What about it? For the use case at hand, they result in the same
complexity. Unless you have spotted a corner case that results in a
non O(1) complexity?

M.

--
Without deviation from the norm, progress is not possible.