implementing serialized startup sequence
janne.karhunen at gmail.com
Mon Mar 15 14:51:16 GMT 2010
On Mon, Mar 15, 2010 at 4:03 PM, Scott James Remnant <scott at netsplit.com> wrote:
>> Implementing 'as fast as possible' bootup often requires implementing
>> serialized startup sequence(s) we call critical sections.
> Do you have any examples of this kind of thing?
> We didn't find that we needed any such critical sections for the Ubuntu
> boot sequence.
That depends on what your goals are. To make this as fast as possible
we (Maemo & Moblin and now Meego) have implemented several critical
sections from which the steps to active desktop and dm are the most
In brief magic goes like:
- break dependencies between startup tasks so that the critical section
is as short as possible
- serialize the critical section so that CPU is doing exactly the thing
required and only that
Moreover, serialized critical section is *a lot* easier to debug & optimize
than a random hassle of things going on at the time. So, we are going on
for the extreme here.
>> Any ideas what would be the best way to do these upstart wise? Serializing startup
>> based on 'start on started' will surely do it, but that implies a direct
>> dependency between tasks A and B and that's not nice. Any other
> You could have a job that started things in order:
> start on startup
> start job1
> start job2
> start job3
> end script
That's an option, but it implies a runner task. Moreover, would
this work with the 'expect' trickery indicating the task startup
state (ie. is it bound to 'started' event)? We're using all expect
variants one way or the other and will probably invent some
more in the future.
More information about the upstart-devel