On 5/31/24 6:43 PM, Alexei Starovoitov wrote:
On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka [off-list ref] wrote:
quoted
might_alloc(flags);
- if (unlikely(should_failslab(s, flags)))
- return NULL;
+ if (static_branch_unlikely(&should_failslab_active)) {
+ if (should_failslab(s, flags))
+ return NULL;
+ }
makes sense.
Acked-by: Alexei Starovoitov <ast@kernel.org>
Thanks :) but please note the cover letter where I explain how I need help
with the bpftrace side (and ftrace, but that seems sorted). Without that
part, bpftrace will silently stop doing the injection as the static key will
remain disabled.
Do you have any microbenchmark numbers before/after this optimization?
Also in cover letter, but will include it in the patch commit log next time.