> -----Original Message-----
> From: Mathew, JohnX
> Sent: Monday, January 03, 2011 8:57 AM
> To: Arjan van de Ven
> Cc: Tardy, Pierre; al; [email protected]; Martin, LoicX
> Subject: RE: [Meego-kernel] Doubt about a timer stat
> 
> >
> > it'll be init I suspect.
> >
> >
> > but.... why not run powertop 1.99 .. it'll tell you in quite a bit of
> > detail who's waking the CPU up ;-)
> 
> The init code which is causing the wakeup has been identified. It's not 
> related to reaping of zombies.
> Instead it is because of a code checking the initctl fifo at 15 sec 
> intervals. The original value of
> this check is 5 secs (sysvinit v 2.86). This was increased to 15 secs for 
> Meego by a patch provided by
> Auke Kok. 

> I don't think it would be a good idea to increase the interval any further as 
> this check is
> responsible for handling init commands like PowerFail and Run level. 
I'm not sure it is the correct. The actual code is following:
void check_init_fifo(void)
{
[snip]
        /* Do select, return on EINTR. */
        FD_ZERO(&fds);
        FD_SET(pipe_fd, &fds);
        tv.tv_sec = 15;
        tv.tv_usec = 0;
        n = select(pipe_fd + 1, &fds, NULL, NULL, &tv);
        if (n <= 0) {
                if (n == 0 || errno == EINTR) return;
                continue;
        }
[snip, actual command processing]

If a timeout occurs, then n will be == 0 so we will going out of this function, 
to the main loop.
By looking at the init.c code, I cannot see any check that would be only 
triggered by this timeout, and not by a signal.
Signals makes n=0 and errno=EINTR

The child list can only change with a signal.
boot_transitions()checks things that comes with SIGHUP
fail_check();checks things that comes with SIGALARM
process_signals();checks things that comes with various signals
start_if_needed();checks things that comes with SIGCHLD

I may not understand everything, and I wonder if that timeout is not there 
because everybody is too scared to completely remove it.
I can see a fedora bug about it, with other study of what that timeout is for:
https://bugzilla.redhat.com/show_bug.cgi?id=249634

Resolution is: moved to upstart...

Arjan, is Meego going to something fancier that sysvinit like upstart or 
systemd?

BTW, what is the status of your fastboot kernel patches that massively 
parallelized the kernel initcalls?

Pierre

int init_main()
{
[snip]
  while(1) {

     /* See if we need to make the boot transitions. */
     boot_transitions();
     INITDBG(L_VB, "init_main: waiting..");

     /* Check if there are processes to be waited on. */
     for(ch = family; ch; ch = ch->next)
        if ((ch->flags & RUNNING) && ch->action != BOOT) break;

#if CHANGE_WAIT
     /* Wait until we get hit by some signal. */
     while (ch != NULL && got_signals == 0) {
        if (ISMEMBER(got_signals, SIGHUP)) {
                /* See if there are processes to be waited on. */
                for(ch = family; ch; ch = ch->next)
                        if (ch->flags & WAITING) break;
        }
        if (ch != NULL) check_init_fifo();
     }
#else /* CHANGE_WAIT */
     if (ch != NULL && got_signals == 0) check_init_fifo();
#endif /* CHANGE_WAIT */

     /* Check the 'failing' flags */
     fail_check();

     /* Process any signals. */
     process_signals();

     /* See what we need to start up (again) */
     start_if_needed();
  }
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to