From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Bill Wendling <morbo@google.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
dwarves@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v2] dwarf_loader: use a better hashing function
Date: Fri, 12 Feb 2021 09:39:51 -0300 [thread overview]
Message-ID: <20210212123951.GF1398414@kernel.org> (raw)
In-Reply-To: <20210212123721.GE1398414@kernel.org>
Em Fri, Feb 12, 2021 at 09:37:22AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 12, 2021 at 12:01:04AM -0800, Bill Wendling escreveu:
> > This hashing function[1] produces better hash table bucket
> > distributions. The original hashing function always produced zeros in
> > the three least significant bits. The new hashing function gives a
> > modest performance boost:
>
> Some tidbits:
>
> You forgot to CC Andrii and also to add this, which I'm doing now:
>
> Suggested-by: Andrii Nakryiko <andrii@kernel.org>
>
> :-)
See below the full cset, that will go public after some more tests here.
- Arnaldo
commit 9fecc77ed82d429fd3fe49ba275465813228e617 (HEAD -> master)
Author: Bill Wendling <morbo@google.com>
Date: Fri Feb 12 00:01:04 2021 -0800
dwarf_loader: Use a better hashing function, from libbpf
This hashing function[1] produces better hash table bucket
distributions. The original hashing function always produced zeros in
the three least significant bits. The new hashing function gives a
modest performance boost:
Original: 0:11.373s
New: 0:11.110s
for a performance improvement of ~2%.
[1] From the hash function used in libbpf.
Committer notes:
Bill found the suboptimality of the hash function being used, Andrii
suggested using the libbpf one, which ended up being better.
Signed-off-by: Bill Wendling <morbo@google.com>
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org
Cc: dwarves@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
next prev parent reply other threads:[~2021-02-12 12:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 23:23 [PATCH] dwarf_loader: use a better hashing function Bill Wendling
2021-02-10 23:59 ` Andrii Nakryiko
2021-02-11 1:24 ` Bill Wendling
2021-02-11 1:31 ` Andrii Nakryiko
2021-02-11 13:01 ` Arnaldo Carvalho de Melo
2021-02-12 6:55 ` Bill Wendling
2021-02-12 12:35 ` Arnaldo Carvalho de Melo
2021-02-12 8:01 ` [PATCH v2] " Bill Wendling
2021-02-12 12:37 ` Arnaldo Carvalho de Melo
2021-02-12 12:39 ` Arnaldo Carvalho de Melo [this message]
2021-02-12 20:14 ` Bill Wendling
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=20210212123951.GF1398414@kernel.org \
--to=acme@kernel.org \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=morbo@google.com \
/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).