Re: [PATCH] module: Use the binary search for symbols resolution
From: Jason Wessel
Date: Thu Apr 07 2011 - 09:50:52 EST
On 04/05/2011 12:22 PM, Alessio Igor Bogani wrote:
> Let the linker sort the exported symbols and use the binary search for locate them.
>
It would be nice if this patch header included some of the information from introduction message, that asside the technical content looks good.
> This work was supported by a hardware donation from the CE Linux Forum.
>
> Signed-off-by: Alessio Igor Bogani <abogani@xxxxxxxxxx>
Reviewed-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
> static bool find_symbol_in_section(const struct symsearch *syms,
> struct module *owner,
> unsigned int symnum, void *data)
> {
> struct find_symbol_arg *fsa = data;
>
> - if (strcmp(syms->start[symnum].name, fsa->name) != 0)
> - return false;
> -
> if (!fsa->gplok) {
> if (syms->licence == GPL_ONLY)
> return false;
This was the only part I had a hard time following, but after having looked at the original source to kernel/module.c, I see how this was optimized and agree.
This looks like a very nice speed up for large interdependent kernel modules.
Cheers,
Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/