[squid-dev] [PATCH] mempools-nozero: turn StoreEntry into MEMPROXY_CLASS

Kinkie gkinkie at gmail.com
Fri Aug 28 15:02:09 UTC 2015


On Thu, Aug 27, 2015 at 9:28 PM, Alex Rousskov <
rousskov at measurement-factory.com> wrote:

> On 08/27/2015 08:58 AM, Kinkie wrote:
>
> >   this patch turns StoreEntry into MEMPROXY_CLASS, getting rid of the
> > default constructors.
> >   In the process, it turns hash_link into a class, giving it a default
> > constructor in order to support nonzeroing pools.
> >   The old custom allocator also gave a nonstandard chunk size; that
> > tweak should not be necessary anymore.
>
> Can you explain why that tweak should not be necessary any more?
>

It was discussed on IRC (log edited for clarity, date is 2015-08-20)

<yadi> AFAIK its optimized for cache_mem holding StoreEntry objects without
either going over the configured cache_mem limit or badly restricting
object count when many 0-byte objects are present.
so som sort of dynamic pool size thing needs to be created. then String,
MemBuf, SBuf, and StoreEntry can use it for their pools.
...
<yadi> looking at StoreEntry itelf Im not clear on why it needs 2MB chunks
in the first place. maybe its just that we have so many in the air all the
time it would mean avoiding long list of chunks in the allocator state.
<yadi> lifeless, have any idea on this? its sort of early Squid-3 or
Squid-2 era stuff
<lifeless> storeentry having a 2MB chunk is relatively recent AFAIK,
post-2004
<lifeless> I'd bet its an optimisation patch though
<yadi> lifeless: I tracked the 2MB Storeentry chunk back toa a patch by
Duane in 1998 documented "adding", for squid 1.2.beta12 it seems
<yadi> kinkie: I think this calls for an experimental targeted conversion
with lots of tests on what behaviour is affected.

I have no objections related to the patch, but FYI:
>
> > $ find-bad-changes.pl < /tmp/mempools-nozero-storeentry.patch
> > src/store.cc:307: Unnecessary code change of: -    mem_obj(NULL),
> > src/store.cc:308:                     ... to: +    mem_obj(nullptr),
>



-- 
    Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150828/9763abcc/attachment.html>


More information about the squid-dev mailing list