[squid-dev] [PATCH Bug 4534 and N-bit fixes for CacheDigest

Kinkie gkinkie at gmail.com
Sun Jul 10 16:27:18 UTC 2016


Hi,

+    uint32_t mask_size; /* mask size in bytes */
+    uint64_t capacity;       /* expected maximum for .count, not a hard
limit */
+    int8_t bits_per_entry;     /* number of bits allocated for each entry
from capacity */
     int count;          /* number of digested entries */
     int del_count;      /* number of deletions performed so far */

Can we sort data members by descending size? This will allow for more
efficient packing in memory.
Apart from this, LGTM. +1 with the suggested change.

On Sat, Jul 9, 2016 at 2:37 PM, Amos Jeffries <squid3 at treenet.co.nz> wrote:

> This patch converts the CacheDigest members and method parameters to use
> explicitly sized data types more appropriate for what details they hold.
>
> * 64-bit Digest capacity (entry count)
> * 32-bit Mask Size (byte count)
> *  8-bit Bit count per entry
>
> Due to various store_digest.cc code still relying on masks not exceeding
> 2^31-1 worth of memory space we have to still assert that bitCount
> calculation does not exceed that value.
>
> Amos
>
>
> _______________________________________________
> squid-dev mailing list
> squid-dev at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-dev
>
>


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


More information about the squid-dev mailing list