All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Bird <tim.bird@am.sony.com>
To: Greg KH <greg@kroah.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Alessio Igor Bogani <abogani@kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Anders Kaseorg <andersk@ksplice.com>,
	Tim Abbott <tabbott@ksplice.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Jason Wessel <jason.wessel@windriver.com>,
	Dirk Behme <dirk.behme@googlemail.com>
Subject: module boot time (was Re: [PATCH] module: Use binary search in lookup_symbol())
Date: Wed, 18 May 2011 14:10:15 -0700	[thread overview]
Message-ID: <4DD435B7.9090702@am.sony.com> (raw)
In-Reply-To: <20110518192110.GB26945@kroah.com>

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 the overall time savings, and
>> he was using a different method (hash tables as opposed to
>> binary search), but I believe the results are comparable
>> to what the binary search enhancement provides.
>>
>> The biggest offenders in his testing were usbcore,
>> ehci_hcd and ohci_hcd.
> 
> Why those?  The size of them, or something else?  They don't seem to
> have very many symbols they need to look up compared to anything else
> that I can tell.
> 
> Is something else going on here due to the serialization of the USB
> drivers themselves?

I don't think there's anything wrong with these, compared to
other kernel modules.  I just think they stood out (probably
because of size) from the other modules in the small set that
Carmelo tested.  In his tests, usbcore was the largest module
by an order of magnitude.

>>> 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 build certain things as modules so you can
defer initializing them until later in the boot sequence.
You can get some critical user-space tasks running, then
come back later to initialize USB and other drivers.
On cameras, it's not uncommon to want to get to user
space in the first 500 milliseconds.

Sony has some code which allows us to both statically link
drivers and defer their initialization, but it's kind of
kludgy and requires modifying the module declarations
for the code you want to defer.  Let me know if you think
this is worth doing an RFC about.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================

  reply	other threads:[~2011-05-18 21:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 20:42 [PATCH] module: Use binary search in lookup_symbol() Alessio Igor Bogani
2011-05-04 15:34 ` Dirk Behme
2011-05-04 17:30   ` Alessio Igor Bogani
2011-05-16 15:36 ` Dirk Behme
2011-05-16 18:02   ` Anders Kaseorg
2011-05-16 20:23     ` Alessio Igor Bogani
2011-05-16 21:01       ` Joe Perches
2011-05-16 21:08         ` Joe Perches
2011-05-17  3:52       ` Rusty Russell
2011-05-17 19:18         ` Dirk Behme
2011-05-17 19:41           ` Alessio Igor Bogani
2011-05-17 20:56             ` Alessio Igor Bogani
2011-05-17 23:22               ` Greg KH
2011-05-17 23:33                 ` Tim Bird
2011-05-18  7:54                   ` Christoph Hellwig
2011-05-18 17:00                     ` Tim Bird
2011-05-18 19:21                       ` Greg KH
2011-05-18 21:10                         ` Tim Bird [this message]
2011-05-18 21:34                           ` module boot time (was Re: [PATCH] module: Use binary search in lookup_symbol()) Greg KH
2011-05-19 19:56                             ` Jeff Mahoney
2011-05-20 21:29                               ` Tim Bird
2011-05-21 14:23                                 ` Jeff Mahoney
2011-05-18 18:55                   ` (unknown), Alessio Igor Bogani
2011-05-18 18:55                     ` Alessio Igor Bogani
2011-05-18 19:22                     ` your mail Greg KH
2011-05-18 20:35                       ` Alessio Igor Bogani
2011-05-18 20:35                         ` [PATCH] module: Use binary search in lookup_symbol() Alessio Igor Bogani
2011-05-18  1:07                 ` Rusty Russell
2011-05-18 15:26               ` Dirk Behme
2011-05-19  7:26                 ` Rusty Russell
2011-05-18  1:10           ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD435B7.9090702@am.sony.com \
    --to=tim.bird@am.sony.com \
    --cc=abogani@kernel.org \
    --cc=andersk@ksplice.com \
    --cc=dirk.behme@googlemail.com \
    --cc=greg@kroah.com \
    --cc=hch@infradead.org \
    --cc=jason.wessel@windriver.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tabbott@ksplice.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.