From: Daniel Borkmann <daniel@iogearbox.net>
To: Martin KaFai Lau <kafai@fb.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
David Miller <davem@davemloft.net>,
kernel-team@fb.com,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux-Sparse <linux-sparse@vger.kernel.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
netdev@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH bpf] bpf: Improve bucket_log calculation logic
Date: Fri, 7 Feb 2020 23:04:50 +0100 [thread overview]
Message-ID: <87b3934a-094f-28c1-c5ce-3792c1fa0356@iogearbox.net> (raw)
In-Reply-To: <20200207081810.3918919-1-kafai@fb.com>
On 2/7/20 9:18 AM, Martin KaFai Lau wrote:
> It was reported that the max_t, ilog2, and roundup_pow_of_two macros have
> exponential effects on the number of states in the sparse checker.
>
> This patch breaks them up by calculating the "nbuckets" first so
> that the "bucket_log" only needs to take ilog2().
>
> Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Applied (& improved changelog to clarify it's not just sparse), thanks!
prev parent reply other threads:[~2020-02-07 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 8:18 [PATCH bpf] bpf: Improve bucket_log calculation logic Martin KaFai Lau
2020-02-07 13:07 ` Luc Van Oostenryck
2020-02-07 18:07 ` Linus Torvalds
2020-02-07 19:39 ` Linus Torvalds
2020-02-07 20:41 ` Luc Van Oostenryck
2020-02-07 21:22 ` Linus Torvalds
2020-02-07 20:13 ` Alexei Starovoitov
2020-02-07 21:09 ` Linus Torvalds
2020-02-07 22:04 ` Daniel Borkmann [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=87b3934a-094f-28c1-c5ce-3792c1fa0356@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=torvalds@linux-foundation.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