From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: "Bird, Tim" <Tim.Bird@sonymobile.com>,
Rob Landley <rob@landley.net>,
Grant Likely <grant.likely@secretlab.ca>,
Borislav Petkov <bp@alien8.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>,
Dirk Behme <dirk.behme@gmail.com>,
"challinan@gmail.com" <challinan@gmail.com>
Subject: Re: Why is the deferred initcall patch not mainline?
Date: Thu, 23 Oct 2014 20:13:36 +0200 [thread overview]
Message-ID: <20141023181336.GC10477@piout.net> (raw)
In-Reply-To: <alpine.LFD.2.11.1410231334250.6969@knanqh.ubzr>
On 23/10/2014 at 13:56:44 -0400, Nicolas Pitre wrote :
> On Thu, 23 Oct 2014, Bird, Tim wrote:
>
> > I'm not sure why this attention to reading the status. The salient feature
> > here is that the initializations are deferred until user space tells the kernel
> > to proceed. It's the initiation of the trigger from user-space that matters.
> > The whole purpose of this feature is to defer some driver initializations until
> > the product can get into a state where it is already ready to perform it's primary
> > function. Only user space knows when that is.
>
> This is still a rather restrictive view of the problem IMHO.
>
> Let's step back a bit. Your concern is that some initcalls are taking
> too long and preventing user space from executing early, right? I'm
> suggesting that they no longer prevent user space from executing
> earlier. Why would you then still want an explicit trigger from user
> space?
>
> > There seems to be a desire to have an automatic mechanism for triggering
> > the deferred initializations. I'm OK with this, as long as there's some reasonable
> > use case for it. There are lots of possible trigger mechanisms, including just
> > a simple timer, but I think it's important that the primary use case of
> > 'trigger-when-user-space-says-to' is still supported.
>
> Why a trigger? I'm suggesting no trigger at all is needed.
>
> Let all initcalls start initializing whenever they can. Simply that
> they shouldn't prevent user space from running early.
>
> Because initcalls are running in parallel, then they must be using
> separate kernel threads. It may be possible to adjust their priority so
> if one of them is actually using a lot of CPU cycles then it will run
> only when all the other threads (including user space) are no longer
> running.
>
You probably can't do that without introducing race conditions. A number
of userspace libraries and script are actually expecting init and probe
to be synchronous. I will refer to the async probe discussion and the
following thread:
http://thread.gmane.org/gmane.linux.kernel/1781529
Anyway, your userspace will have to have a way to know what has been
initialized. On my side, I was also using that mechanism to delay the
network stack init but I still want to know when my dhcp client can
start for example.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-10-23 18:13 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 5:07 Why is the deferred initcall patch not mainline? Dirk Behme
2014-10-18 8:11 ` Bird, Tim
2014-10-18 14:05 ` Alexandre Belloni
2014-10-18 21:09 ` Bird, Tim
2014-10-20 8:32 ` Geert Uytterhoeven
2014-10-19 6:59 ` Dirk Behme
2014-10-21 11:27 ` Alexandre Belloni
2014-10-21 12:52 ` Grant Likely
2014-10-21 12:53 ` Grant Likely
2014-10-21 16:31 ` Nicolas Pitre
2014-10-21 19:37 ` Bird, Tim
2014-10-21 19:58 ` Nicolas Pitre
2014-10-22 10:05 ` Geert Uytterhoeven
2014-10-22 15:05 ` Rob Landley
2014-10-22 15:49 ` Nicolas Pitre
2014-10-23 17:21 ` Bird, Tim
2014-10-23 17:56 ` Nicolas Pitre
2014-10-23 18:13 ` Alexandre Belloni [this message]
2014-10-23 19:05 ` Nicolas Pitre
2014-10-23 20:10 ` Bird, Tim
2014-10-23 20:50 ` Nicolas Pitre
2014-10-23 22:37 ` Rob Landley
2014-10-24 0:36 ` Nicolas Pitre
2014-10-24 19:38 ` Rob Landley
2014-10-24 20:28 ` Geert Uytterhoeven
2014-10-27 20:29 ` Nicolas Pitre
2014-10-27 21:37 ` Alexandre Belloni
2014-10-29 23:49 ` Tim Bird
2014-10-30 8:51 ` Geert Uytterhoeven
2014-11-02 2:37 ` Nicolas Pitre
2014-11-02 9:01 ` Geert Uytterhoeven
2014-11-02 3:46 ` Nicolas Pitre
2014-10-24 21:05 ` Nicolas Pitre
2014-10-23 22:01 ` Rob Landley
2014-10-24 0:31 ` Nicolas Pitre
2014-10-23 18:37 ` Rob Landley
2014-10-22 5:31 ` Dirk Behme
2014-10-22 9:49 ` Frank Rowand
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=20141023181336.GC10477@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=Tim.Bird@sonymobile.com \
--cc=bp@alien8.de \
--cc=challinan@gmail.com \
--cc=dirk.behme@gmail.com \
--cc=geert@linux-m68k.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-embedded@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=rob@landley.net \
/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.