linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David VomLehn <dvomlehn@cisco.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: linux-embedded <linux-embedded@vger.kernel.org>
Subject: Re: Recommendation for activating a deferred module init in the kernel
Date: Tue, 17 Jun 2008 11:51:48 -0700	[thread overview]
Message-ID: <485807C4.6080609@cisco.com> (raw)
In-Reply-To: <48580116.9070504@am.sony.com>

Tim Bird wrote:
> Hi all,
> 
> I am working with a product team on bootup time issues.  One technique that we
> are forward-porting from an old kernel (and that I thought I might work on
> mainlining) is to compile modules statically into the kernel, but defer their
> initialization until after boot time.
...
> One of the main sub-systems that we defer initialization of this way is USB,
> and this saves quite a bit of time.  (Of course the same, or slightly more CPU
> cycles are eventually used during bootup time.  But this lets us get to user
> space quicker so we can start user-visible applications faster.)
> 
> I'm not that happy using an ioctl for this trigger.  What is the preferred
> method of activating a kernel feature like this? I presume something in /proc
> or /sys, but I'm not sure.

 From your description, it seems as though you always want to do the
initialization, you just may want to delay it until well after starting up user
space. If something like this were performance-critical, an ioctl might be 
justified, but this would be a one-time trigger. I think that making this as 
closely analogous to loading a kernel module as possible is a good conceptual 
approach. Since you might choose, at run time, whether or not to load a kernel 
module, it makes sense to do this on a device-by-device basis. To me, that 
suggests doing something in /sys.

My first impression was that this was an awful kludge, but drawing the parallel 
to loadable modules makes me not only happier, but also leads me into wondering 
if there shouldn't be a generic framework for supporting this. So, instead of 
using module_init, there might be some other macro that indicated that this 
driver was to be initialized in a deferred, and optional, fashion.

-- 
David VomLehn, dvomlehn@cisco.com
The opinions expressed herein are likely mine, but might not be my employer's...




     - - - - -                              Cisco                            - - - - -         
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to 
the addressee). If you are not the intended recipient of this message, you are 
not authorized to read, print, retain, copy or disseminate this message or any 
part of it. If you have received this e-mail in error, please notify the sender 
immediately by return e-mail and delete it from your computer.


  reply	other threads:[~2008-06-17 18:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 18:23 Recommendation for activating a deferred module init in the kernel Tim Bird
2008-06-17 18:51 ` David VomLehn [this message]
2008-06-17 19:07 ` Jörn Engel
2008-06-17 19:22   ` Jim Freeman
2008-06-17 20:06     ` Tim Bird
2008-06-17 19:52   ` Tim Bird
2008-06-17 19:55     ` Tim Bird
2008-06-17 20:23       ` Jörn Engel
2008-06-17 20:35         ` Josh Boyer
2008-06-17 22:48           ` Stefan Richter
2008-06-18  0:03             ` Johannes Stezenbach
2008-06-18  0:10               ` Stefan Richter
2008-06-18  9:38                 ` Johannes Stezenbach
2008-06-17 20:19     ` Jörn Engel
2008-06-18 12:38 ` Amol Lad
     [not found] ` <4858A659.8030502@codefidence.com>
2008-06-18 16:08   ` Tim Bird
     [not found]     ` <4859ECF3.3000500@codefidence.com>
2008-06-19 17:58       ` Tim Bird
2008-06-22  7:08         ` Gilad Ben-Yossef
2008-06-23 17:40           ` Tim Bird
2008-07-01 14:20             ` Gilad Ben-Yossef
  -- strict thread matches above, loose matches on Subject: below --
2008-06-18  6:47 Gilad Ben-Yossef
2008-06-18  8:20 ` David Woodhouse
2008-06-18  8:32   ` David Woodhouse
2008-06-18  8:52   ` Adrian Bunk
2008-06-18  8:57     ` Geert Uytterhoeven
2008-06-18  9:59       ` David Woodhouse
2008-06-18 10:33         ` Adrian Bunk
2008-06-18 10:41           ` David Woodhouse
2008-06-18 11:37           ` Geert Uytterhoeven
2008-06-18 14:56             ` Nicolas Pitre

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=485807C4.6080609@cisco.com \
    --to=dvomlehn@cisco.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=tim.bird@am.sony.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).