[squid-dev] [RFC][PATCH] Bug4438 second attempt: give MemBlob its own pools

Kinkie gkinkie at gmail.com
Mon Mar 14 20:11:42 UTC 2016


Hi all,
  this second attempt at bug4438 tries a different approach: by giving
MemBlob its own pools and having a hard initialization dependency in
MemBlob's allocating function, instead of relying on memAllocString.

Known side-effects:
- allows to tune memblob sizes according to actual use patterns, which
can be collected via SBuf/MemBlob detailed stats. The currently-set
sizes follow some light testing I've done.
- it causes a dependency on full libmem in unit tests, since stubbing
memAllocString and friends is no longer sufficient
- as no MemBlob can be initialized before MemPools, there is no need
to baloon statically-initialized MemBlobs to
SmallestStringBeforeMemIsInitialized.

One thing I can't figure out is in cachemgr mem report: it lists the
smallest-sized MemBlob pool twice. I've treble-checked: MemBlob pools
are only initialized once, yet in following the
MemPools::Instance::pools linked-list they appear more than once. I
can't really understand why.

Comments?

Thanks

-- 
    Francesco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memblob-self-pools-v1.bundle
Type: application/octet-stream
Size: 17508 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20160314/51d89d90/attachment-0001.obj>


More information about the squid-dev mailing list