Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Rusty Russell
On Tue, 17 May 2011 21:18:26 +0200, Dirk Behme wrote: > On 17.05.2011 05:52, Rusty Russell wrote: > > On Mon, 16 May 2011 22:23:40 +0200, Alessio Igor Bogani > > wrote: > >> This work was supported by a hardware donation from the CE Linux Forum. > >> > >> Signed-off-by: Alessio Igor Bogani > >>

Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Rusty Russell
On Tue, 17 May 2011 16:22:41 -0700, Greg KH wrote: > On Tue, May 17, 2011 at 10:56:03PM +0200, Alessio Igor Bogani wrote: > > This work was supported by a hardware donation from the CE Linux Forum. > > > > Signed-off-by: Alessio Igor Bogani > > --- > > That's nice, but _why_ do this change? Wh

Re: module boot time (was Re: [PATCH] module: Use binary search in lookup_symbol())

2011-05-18 Thread Greg KH
On Wed, May 18, 2011 at 02:10:15PM -0700, Tim Bird wrote: > >>> And why do people overly care for the load time? > >> > >> To reduce overall boot time. > > > > To reduce it even more, build the modules into the kernel :) > > That's what I do most of the time. For some projects, > it is useful to

module boot time (was Re: [PATCH] module: Use binary search in lookup_symbol())

2011-05-18 Thread Tim Bird
On 05/18/2011 12:21 PM, Greg KH wrote: > On Wed, May 18, 2011 at 10:00:12AM -0700, Tim Bird wrote: >> Carmelo Amoroso reported some good performance gains >> in this presentation: >> http://elinux.org/images/1/18/C_AMOROSO_Fast_lkm_loader_ELC-E_2009.pdf >> (See slide 22). >> >> He doesn't report th

[PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Alessio Igor Bogani
The function is_exported() with its helper function lookup_symbol() are used to verify if a provided symbol is effectively exported by the kernel or by the modules. Now that both have their symbols sorted we can replace a linear search with a binary search which provide a considerably speed-up. Th

Re: your mail

2011-05-18 Thread Alessio Igor Bogani
Dear Mr. Kroah-Hartman, 2011/5/18 Greg KH : [...] > Care to resend it without all the stuff above so someone (Rusty I guess) > can apply it? Sure! It'll follow in few minutes. Thank you very much! Ciao, Alessio -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the

Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Greg KH
On Wed, May 18, 2011 at 10:00:12AM -0700, Tim Bird wrote: > On 05/18/2011 12:54 AM, Christoph Hellwig wrote: > > On Tue, May 17, 2011 at 04:33:07PM -0700, Tim Bird wrote: > >> That said, I can answer Greg's question. This is to speed up > >> the symbol resolution on module loading. The last numbe

Re: your mail

2011-05-18 Thread Greg KH
On Wed, May 18, 2011 at 08:55:25PM +0200, Alessio Igor Bogani wrote: > Dear Mr. Bird, Dear Mr. Kroah-Hartman, > > Sorry for my very bad English. > > 2011/5/18 Tim Bird : > [...] > > Alessio - do you have any timings you can share for the speedup? > > You can find a little benchmark using ftrace

[no subject]

2011-05-18 Thread Alessio Igor Bogani
Dear Mr. Bird, Dear Mr. Kroah-Hartman, Sorry for my very bad English. 2011/5/18 Tim Bird : [...] > Alessio - do you have any timings you can share for the speedup? You can find a little benchmark using ftrace at end of this email: https://lkml.org/lkml/2011/4/5/341 > On 05/17/2011 04:22 PM, Gre

Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Tim Bird
On 05/18/2011 12:54 AM, Christoph Hellwig wrote: > On Tue, May 17, 2011 at 04:33:07PM -0700, Tim Bird wrote: >> That said, I can answer Greg's question. This is to speed up >> the symbol resolution on module loading. The last numbers I >> saw showed a reduction of about 15-20% for the module load

Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Dirk Behme
On 17.05.2011 22:56, Alessio Igor Bogani wrote: This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: Alessio Igor Bogani --- kernel/module.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index

Re: [PATCH] module: Use binary search in lookup_symbol()

2011-05-18 Thread Christoph Hellwig
On Tue, May 17, 2011 at 04:33:07PM -0700, Tim Bird wrote: > That said, I can answer Greg's question. This is to speed up > the symbol resolution on module loading. The last numbers I > saw showed a reduction of about 15-20% for the module load > time, for large-ish modules. Of course this is hig