From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
Daniel Borkmann <daniel@iogearbox.net>,
Networking <netdev@vger.kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"Kernel Team" <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 3/3] bpf: convert explored_states to hash table
Date: Wed, 22 May 2019 04:18:48 +0000 [thread overview]
Message-ID: <569b0549-a32e-d7f4-a6f3-0d0d80879472@fb.com> (raw)
In-Reply-To: <CAEf4BzYKrKniMmS8mTfcFS8aD1ybTY2RRFq+yXKXoXUpkQeeJA@mail.gmail.com>
On 5/21/19 9:09 PM, Andrii Nakryiko wrote:
>
>> Hit/miss heuristic is not counting index miscompare as a miss.
>> Otherwise verifier stats become unstable when experimenting
>> with different hash functions.
>>
>> If insn comparison is done inside states_equal() then
>> miss > hit * 3 + 3 heuristic affects 'collisions'.
>> The cases where different indices fall into the same bucket.
>> And verifier stats fluctuate when hash function or size changes.
>>
>
> Yeah, that make sense. I wonder if curframe comparison has similar
> effect, states from different frames seem similar to hash collisions
> between different instruction states in that regard. Or they are not?
Since curframe is not part of the hash it doesn't have such property.
prev parent reply other threads:[~2019-05-22 4:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 23:06 [PATCH bpf-next 0/3] bpf: optimize explored_states Alexei Starovoitov
2019-05-21 23:06 ` [PATCH bpf-next 1/3] bpf: cleanup explored_states Alexei Starovoitov
2019-05-22 1:04 ` Jakub Kicinski
2019-05-21 23:06 ` [PATCH bpf-next 2/3] bpf: split explored_states Alexei Starovoitov
2019-05-21 23:06 ` [PATCH bpf-next 3/3] bpf: convert explored_states to hash table Alexei Starovoitov
2019-05-22 0:55 ` Andrii Nakryiko
2019-05-22 2:17 ` Alexei Starovoitov
2019-05-22 4:09 ` Andrii Nakryiko
2019-05-22 4:18 ` Alexei Starovoitov [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=569b0549-a32e-d7f4-a6f3-0d0d80879472@fb.com \
--to=ast@fb.com \
--cc=Kernel-team@fb.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@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).