lkml.org 
[lkml]   [2011]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] module: Use the binary search for symbols resolution
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@kernel.org>

Reviewed-by: Jason Wessel <jason.wessel@windriver.com>


> 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.


\
 
 \ /
  Last update: 2011-04-07 22:35    [W:0.199 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site