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: <54EE1AC8.6060206@iogearbox.net> Date: Wed, 25 Feb 2015 19:56:08 +0100 From: Daniel Borkmann <daniel@...earbox.net> To: Eric Dumazet <eric.dumazet@...il.com> CC: David Laight <David.Laight@...LAB.COM>, "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 On 02/25/2015 06:41 PM, Eric Dumazet wrote: ... > There is no need to track number of elements, using either an atomic_t > or percpu_counter. This adds unnecessary burden. > > 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. So you are saying that shrinking is most likely a rather undesirable use-case in rhashtable? > 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) Yes, I think such a facility can be added easily. > A global limit on number of elements should be controlled by rhashtable > users - if needed -, not in the rhashtable itself. Makes sense, thanks for the suggestion! I'll experiment with the above per bucket tracking a bit if you're okay with that, and also unfiddle the rht counter internals from netlink. Thanks, Daniel -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists