From: Josh Hunt <johunt@akamai.com>
To: Phil Oester <kernel@linuxace.com>
Cc: "netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>,
"kadlec@blackhole.kfki.hu" <kadlec@blackhole.kfki.hu>
Subject: Re: [PATCH v2 0/2] ipset: forceadd support
Date: Fri, 28 Feb 2014 08:26:41 -0600 [thread overview]
Message-ID: <53109CA1.8070006@akamai.com> (raw)
In-Reply-To: <20140228034123.GA12861@home>
On 02/27/2014 09:41 PM, Phil Oester wrote:
> On Thu, Feb 27, 2014 at 06:04:44PM -0500, Josh Hunt wrote:
>> Forceadd is a property for hash set types and is passed in duration creation.
>> When sets with this property enabled are full each subsequent 'add' operation
>> will attempt to evict a random entry from the set.
>
> Wouldn't it be better to evict the oldest entry instead of a random one?
>
> Phil
I was trying to introduce no extra overhead with this feature, in
general and when we are doing adds to the set. I thought about doing
what you're suggesting, but I would need to add something to track the
oldest entry which may not be as trivial as it sounds given things like
timeouts. In addition to that I'd still need to traverse the bucket to
find this entry to evict. Given those two things I did not go down that
path.
Thanks for reviewing!
Josh
prev parent reply other threads:[~2014-02-28 14:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 23:04 [PATCH v2 0/2] ipset: forceadd support Josh Hunt
2014-02-27 23:04 ` [PATCH v2 1/2] ipset: add forceadd kernel support for hash set types Josh Hunt
2014-02-28 21:29 ` Jozsef Kadlecsik
2014-02-27 23:04 ` [PATCH v2 2/2] ipset: add userspace support for forceadd Josh Hunt
2014-02-28 9:25 ` Pablo Neira Ayuso
2014-02-28 21:46 ` Jozsef Kadlecsik
2014-02-28 21:52 ` Josh Hunt
2014-02-28 3:41 ` [PATCH v2 0/2] ipset: forceadd support Phil Oester
2014-02-28 14:26 ` Josh Hunt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53109CA1.8070006@akamai.com \
--to=johunt@akamai.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=kernel@linuxace.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).