Mandrake Linux Archives: cooker@mandrivalinux.org

Mandrake Linux: cooker@mandrivalinux.org


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

  • From: Fabrice FACORAT
  • Subject: Re: [Cooker] Parallel init for Mandriva
  • Date: 5 Oct 2005 12:30:48 -0000

Le Mardi 4 Octobre 2005 22:24, Couriousous a écrit :
> Hello
>
> Since a long time I've been thinking about a parallel init implementation
> in Mandriva. Now exam are finished, I've written it.
>
> But there are three major concern about a possible parallel init
> integration in Mandriva, so it was my goal :
>
> 	- LSB compliance
> 	- Does not mix up startup script output
> 	- Doesn't need heavy modification to current startup script
>
> Let's explain a bit how to make it working :
> Every init script can Require and Provide a service. The service name is
> automatically provided. To be parallel-enabled, it _MUST_ contain the
> following line :
> # X-Parallel-init
> Then, with a such line, the boot processes only take care of requires to
> know when to start the script, there is no more SXXservice ordering.
> Requires must be tagged exactly as below on only _one_ line:
> # Requires: service1 service2 service3
> And provides:
> # Provides: provide1 provide2

> If a service requires nothing, you can only set "# X-Parallel-init". If the
> service must be started as the lastest service "# Requires: *" but NO
> service must depend on it.
>
> Let's come about LSB compliance. If a service doesn't contain the magic "#
> X-Parallel-init" line, it will automatically requires every service who are
> before ( in term of filename ) him, and every service after him will
> requires it. So, it will be started in the same order as in a standard init
> scheme and not in parallel.
>
> How does it keep a clean output ? The output of every service is temporary
> stocked in a file

in a read only environment, what will happen ?

> and then when the service startup is over, it's printed 
> on the console. The console is accessed by a mutex, so the output is not
> mixed.
>
> It has a basic requires loop detection and resolution: if service A
> requires B which requires C which requires A. The boot process will
> deadlock. To avoid that, it will broke a requires ( and complain loudly ).
>
> What's missing [ hint: patch welcome ]:
> 	- Integration with bootsplash, i've started the implementation but I don't
> know how bootsplash works internally.
>
> What are current limitations ( patch also welcome ):
> 	- If a service requies is provided by two or more service, only the first
> found is effectivly required.

IMHO this is a feature :)

> 	- Doesn't do exactly what rc script do. If it matter, I can adapt, but I
> don't think it worth the effort.
> 	- very strict about script syntax
> 	- isn't bullet proof agains user misuse
> 	- A lot of other things I haven't thinked at.
>
> What about performance ? see:
> http://www.zarb.org/~couriousous/boot/bootchart-normal.png
> http://www.zarb.org/~couriousous/boot/bootchart-parallel.png
>
> There is 12 sec gain in boot. It mean a 20% speedup over total boot time
> and ~25% speedup over runlevel bootime. We can see now that there are no
> more wait in boot process and the limiting factor is the harddisk.

congratulation for this great work.
Did you have a look at init-ng and others projects to see what they implement, 
etc ...

> To try yourself
> WARNING! THIS IS PRE-ALPHA SOFTWARE. If you don't know how to repair a
> system with broken initscript, DON'T TRY !!
>
> Download http://www.zarb.org/~couriousous/boot/prcsys.c
> compile it with gcc -Wall prcsys.c -lpthread -o prcsys
> then put the "prcsys" binary in /sbin
>
> Download http://www.zarb.org/~couriousous/boot/rc.patch then apply it
> to /etc/rc.d/rc file.
>
> Then goto http://www.zarb.org/~couriousous/boot/services/ and pick the
> patch for each service you want to convert. There are not a patch for every
> service in the distribution, I will produce more if there are interest to
> do it. Alternatively you can do it yourself with the above explanations and
> contribute it back.
>
> Then reboot and put "pinit" as kernel parameter. If you don't do it, it
> will fall back to the classical boot.


-- 
> Le neuneu est un con qui débute. C'est une espèce rare mais qui fait
> beaucoup de bruit.
 -+- JCD in Guide du Linuxien pervers - Bien configurer son neuneu.



Date Index | Thread Index

Search the archive:



To (un)subscribe from/to the lists:

Sympa mailing lists server.





Fund the Mandriva Linux project

Looking for a job?