[prev in list] [next in list] [prev in thread] [next in thread] 

List:       live-patching
Subject:    Re: [PATCHv3 bpf-next 3/3] bpf: Change modules resolving for kprobe multi link
From:       Petr Mladek <pmladek () suse ! com>
Date:       2023-01-18 14:10:32
Message-ID: Y8f92N1AjLM0hYis () alley
[Download RAW message or body]

On Mon 2023-01-16 11:10:09, Jiri Olsa wrote:
> We currently use module_kallsyms_on_each_symbol that iterates all
> modules/symbols and we try to lookup each such address in user
> provided symbols/addresses to get list of used modules.
> 
> This fix instead only iterates provided kprobe addresses and calls
> __module_address on each to get list of used modules. This turned
> out ot be simpler and also bit faster.
> 
> On my setup with workload (executed 10 times):
> 
>    # test_progs -t kprobe_multi_bench_attach/modules
> 
> Current code:
> 
>  Performance counter stats for './test.sh' (5 runs):
> 
>     76,081,161,596      cycles:k                   ( +-  0.47% )
> 
>            18.3867 +- 0.0992 seconds time elapsed  ( +-  0.54% )
> 
> With the fix:
> 
>  Performance counter stats for './test.sh' (5 runs):
> 
>     74,079,889,063      cycles:k                   ( +-  0.04% )
> 
>            17.8514 +- 0.0218 seconds time elapsed  ( +-  0.12% )
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>

The change looks good to me:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic