netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Thomas Graf <tgraf@suug.ch>, Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 net-next 3/3] rhashtable: Add scored lookups
Date: Tue, 14 Jul 2015 17:25:33 -0700	[thread overview]
Message-ID: <CALx6S37ce-WF922inJ=JsUEFWL5UiT2=qqDC3UqVGtPFUnpJ+w@mail.gmail.com> (raw)
In-Reply-To: <20150715001854.GA29934@gondor.apana.org.au>

On Tue, Jul 14, 2015 at 5:18 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, Jul 14, 2015 at 04:45:49PM -0700, Tom Herbert wrote:
>>
>> +             } else if (score == best_score) {
>> +                     matches++;
>> +                     if (reciprocal_scale(khash, matches) == 0)
>> +                             result = he;
>> +                     khash = next_pseudo_random32(khash);
>> +             }
>
> Note that during a rehash you can encounter the same object multiple
> times, does this logic still work in that case?
>
I would think. The property being supported here is uniform
distribution, *not* consistency.

Tom

> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2015-07-15  0:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 23:45 [PATCH v2 net-next 0/3] rhashtable: Wildcard and scored lookups Tom Herbert
2015-07-14 23:45 ` [PATCH v2 net-next 1/3] rhashtable: Allow lookup function to have compare function agument Tom Herbert
2015-07-17 12:08   ` Thomas Graf
2015-07-14 23:45 ` [PATCH v2 net-next 2/3] rhashtable: Add a function for in order insertion and lookup in buckets Tom Herbert
2015-07-15  5:54   ` Herbert Xu
2015-07-15 19:46     ` Tom Herbert
2015-07-17 12:11       ` Thomas Graf
2015-07-14 23:45 ` [PATCH v2 net-next 3/3] rhashtable: Add scored lookups Tom Herbert
2015-07-15  0:18   ` Herbert Xu
2015-07-15  0:25     ` Tom Herbert [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='CALx6S37ce-WF922inJ=JsUEFWL5UiT2=qqDC3UqVGtPFUnpJ+w@mail.gmail.com' \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).