[squid-dev] [PATCH] cleanup external_acl_type cache

Alex Rousskov rousskov at measurement-factory.com
Wed Apr 12 16:32:08 UTC 2017


On 04/12/2017 10:13 AM, Amos Jeffries wrote:

> The current O(1) is achieved only through the way dlink requires an
> iterator raw-pointer to be stored in the Entry itself, not the list
> owner object.

Yes, dlink is an intrusive list.


> That itself is a yuck factor that causes us a lot of
> pointer invalidation problems changing this code.

Using an intrusive list _concept_ is the best solution in some contexts.
The current dlink _implementation_ can be improved or replaced, but we
should not throw out intrusive lists as a concept just because of
implementation bugs.

I am not sure why you said what you said above so I am just trying to
clarify this in case you are thinking that intrusive lists must be
banned from future code.


> Long term I would like to drop lru_list (and maybe Entry too) from
> external_acl in favour of a cache member of type LruMap hiding all the
> complex stuff.

Better [LRU-driven] ACL cache implementations should be welcomed, of
course. I cannot say whether what you are describing would be better due
to insufficient detail/precision (or my insufficient understanding of
the underlying code) but "hiding complex stuff" sounds good :-).

Alex.



More information about the squid-dev mailing list