Re: [PATCH v7 00/11] kallsyms: Optimizes the performance of lookup symbols

From: Luis Chamberlain
Date: Wed Oct 19 2022 - 08:42:24 EST


On Mon, Oct 17, 2022 at 02:49:39PM +0800, Zhen Lei wrote:
> Currently, to search for a symbol, we need to expand the symbols in
> 'kallsyms_names' one by one, and then use the expanded string for
> comparison. This is very slow.
>
> In fact, we can first compress the name being looked up and then use
> it for comparison when traversing 'kallsyms_names'.
>
> This patch series optimizes the performance of function kallsyms_lookup_name(),
> and function klp_find_object_symbol() in the livepatch module. Based on the
> test results, the performance overhead is reduced to 5%. That is, the
> performance of these functions is improved by 20 times.

Stupid question, is a hash table in order?

Luis