lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CAEEB34@AcuExch.aculab.com> Date: Thu, 26 Feb 2015 14:18:20 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Eric Dumazet' <eric.dumazet@...il.com>, Daniel Borkmann <daniel@...earbox.net> CC: "davem@...emloft.net" <davem@...emloft.net>, "tgraf@...g.ch" <tgraf@...g.ch>, "pablo@...filter.org" <pablo@...filter.org>, "johunt@...mai.com" <johunt@...mai.com>, "kaber@...sh.net" <kaber@...sh.net>, "netdev@...r.kernel.org" <netdev@...r.kernel.org> Subject: RE: [PATCH net 2/2] rhashtable: remove indirection for grow/shrink decision functions > 1) Automatic shrinking is a non issue. This will free very little > memory, compared to previous peak usage (including objects put in > rhashtable). If hash grown to a certain point, it's likely it will grow > again later. Shrink could be done 'on demand' from the 'user' when the number of elements is known to have significantly reduced. > 2) Growing can be triggered when any bucket has more than X elems, and > that is given for free at insert time. > X could be log2(buckets)/2 I guess. (aka shift/2) If growing is triggered when a bucket has more than X elems, then setting X very high will stop automatic growing. Growing would then only be done in response to user requests. Whether X should be constant, or log2(buckets)/n is another matter. Or something like N1 + (N2 * log2(buckets))/64 in any case it only needs recalculating after an auto-grow. David
Powered by blists - more mailing lists