Thread (19 messages) flat view 19 messages, 8 authors, 2024-06-02

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

From: Roman Gushchin <roman.gushchin@linux.dev>
Date: 2024-05-31 23:44:26
Also in: bpf, linux-mm, lkml

On Fri, May 31, 2024 at 11:33:34AM +0200, Vlastimil Babka wrote:
Since commit 4f6923fbb352 ("mm: make should_failslab always available for
fault injection") should_failslab() is unconditionally a noinline
function. This adds visible overhead to the slab allocation hotpath,
even if the function is empty. With CONFIG_FAILSLAB=y there's additional
overhead when the functionality is not enabled by a boot parameter or
debugfs.

The overhead can be eliminated with a static key around the callsite.
Fault injection and error injection frameworks can now be told that the
this function has a static key associated, and are able to enable and
disable it accordingly.

Signed-off-by: Vlastimil Babka <redacted>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help