2009-03-29 15:40:27

by Corrado Zoccolo

[permalink] [raw]
Subject: How to debug kernel startup time?

Hi,
I'm seeing around 2 s "lost" during kernel boot, that are not
accounted for any init call (excerpt of dmesg with initcall_debug
follows, kernel is 2.6.29).
What's the suggested way to investigate such problems?

Thanks,
Corrado

[ 1.797146] calling tcp_congestion_default+0x0/0xf @ 1
[ 1.797279] initcall tcp_congestion_default+0x0/0xf returned 0 after 48 usecs
[ 1.911721] mmc0: new SDHC card at address b368
[ 1.912155] mmcblk0: mmc0:b368 SDC 7.46 GiB
[ 1.912293] mmcblk0: p1
[ 2.095702] usb 1-5: New USB device found, idVendor=064e, idProduct=d101
[ 2.095801] usb 1-5: New USB device strings: Mfr=3, Product=1, SerialNumber=4
[ 2.095902] usb 1-5: Product: Acer Crystal Eye webcam
[ 2.095980] usb 1-5: Manufacturer: SuYin
[ 2.096053] usb 1-5: SerialNumber: CN0316-M608-OV01-VA-R02.00.00
[ 2.096440] usb 1-5: configuration #1 chosen from 1 choice
[ 2.500110] Clocksource tsc unstable (delta = -282878412 ns)
[ 3.946532] Synaptics Touchpad, model: 1, fw: 7.2, id: 0x1c0b1,
caps: 0xd04771/0xa40000
[ 4.005707] input: SynPS/2 Synaptics TouchPad as /class/input/input7
[ 4.540135] async_waiting @ 1
[ 4.540226] async_continuing @ 1 after 1 usec
[ 4.544604] kjournald starting. Commit interval 5 seconds
[ 4.544697] EXT3-fs: mounted filesystem with ordered data mode.
[ 4.544792] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[ 4.544917] async_waiting @ 1
[ 4.544991] async_continuing @ 1 after 1 usec
[ 4.545222] Freeing unused kernel memory: 276k freed
[ 4.545430] Write protecting the kernel text: 3128k
[ 4.545576] Write protecting the kernel read-only data: 1480k

--
__________________________________________________________________________

dott. Corrado Zoccolo mailto:[email protected]
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------


2009-03-29 15:50:17

by Arjan van de Ven

[permalink] [raw]
Subject: Re: How to debug kernel startup time?

On Sun, 29 Mar 2009 17:40:10 +0200
Corrado Zoccolo <[email protected]> wrote:

> Hi,
> I'm seeing around 2 s "lost" during kernel boot, that are not
> accounted for any init call (excerpt of dmesg with initcall_debug
> follows, kernel is 2.6.29).
> What's the suggested way to investigate such problems?

I take it you don't have an initrd ?

If so I know what you are hitting; I have a patch to solve it but it's
a bit convoluted and not ready for mainline.... let me know if you want
to try it, I suspect it'll solve your issue ;)

2009-03-29 16:45:51

by Corrado Zoccolo

[permalink] [raw]
Subject: Re: How to debug kernel startup time?

On Sun, Mar 29, 2009 at 5:51 PM, Arjan van de Ven <[email protected]> wrote:
> On Sun, 29 Mar 2009 17:40:10 +0200
> Corrado Zoccolo <[email protected]> wrote:
>
>> Hi,
>> I'm seeing around 2 s "lost" during kernel boot, that are not
>> accounted for any init call (excerpt of dmesg with initcall_debug
>> follows, kernel is 2.6.29).
>> What's the suggested way to investigate such problems?
>
> I take it you don't have an initrd ?

You guessed right.

>
> If so I know what you are hitting; I have a patch to solve it but it's
> a bit convoluted and not ready for mainline.... let me know if you want
> to try it, I suspect it'll solve your issue ;)
>

Sure. I'd like to test it.

Thanks,
Corrado

--
__________________________________________________________________________

dott. Corrado Zoccolo mailto:[email protected]
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------

2009-03-29 16:58:16

by Arjan van de Ven

[permalink] [raw]
Subject: Re: How to debug kernel startup time?

On Sun, 29 Mar 2009 18:45:36 +0200
Corrado Zoccolo <[email protected]> wrote:

> On Sun, Mar 29, 2009 at 5:51 PM, Arjan van de Ven
> <[email protected]> wrote:
> > On Sun, 29 Mar 2009 17:40:10 +0200
> > Corrado Zoccolo <[email protected]> wrote:
> >
> >> Hi,
> >> I'm seeing around 2 s "lost" during kernel boot, that are not
> >> accounted for any init call (excerpt of dmesg with initcall_debug
> >> follows, kernel is 2.6.29).
> >> What's the suggested way to investigate such problems?
> >
> > I take it you don't have an initrd ?
>
> You guessed right.
>
> >
> > If so I know what you are hitting; I have a patch to solve it but
> > it's a bit convoluted and not ready for mainline.... let me know if
> > you want to try it, I suspect it'll solve your issue ;)
> >
>
> Sure. I'd like to test it.
>

attached...

--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


Attachments:
(No filename) (971.00 B)
linux-2.6.29-dont-wait-for-mouse.patch (1.33 kB)
linux-2.6.29-retry-root-mount.patch (1.88 kB)
Download all attachments

2009-03-31 06:06:44

by Corrado Zoccolo

[permalink] [raw]
Subject: Re: How to debug kernel startup time?

On Sun, Mar 29, 2009 at 6:59 PM, Arjan van de Ven <[email protected]> wrote:
> On Sun, 29 Mar 2009 18:45:36 +0200
> Corrado Zoccolo <[email protected]> wrote:
>
>> On Sun, Mar 29, 2009 at 5:51 PM, Arjan van de Ven
>> <[email protected]> wrote:
>> > On Sun, 29 Mar 2009 17:40:10 +0200
>> > Corrado Zoccolo <[email protected]> wrote:
>> >
>> >> Hi,
>> >> I'm seeing around 2 s "lost" during kernel boot, that are not
>> >> accounted for any init call (excerpt of dmesg with initcall_debug
>> >> follows, kernel is 2.6.29).
>> >> What's the suggested way to investigate such problems?
>> >
>> > I take it you don't have an initrd ?
>>
>> You guessed right.
>>
>> >
>> > If so I know what you are hitting; I have a patch to solve it but
>> > it's a bit convoluted and not ready for mainline.... let me know if
>> > you want to try it, I suspect it'll solve your issue ;)
>> >
>>
>> Sure. I'd like to test it.
>>
>
> attached...

They worked fine. With fastboot enabled + some ACPI patch that alexei
is working on, I can now boot the kernel in 1.7s.

Corrado

>
> --
> Arjan van de Ven        Intel Open Source Technology Centre
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
>



--
__________________________________________________________________________

dott. Corrado Zoccolo mailto:[email protected]
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------
The self-confidence of a warrior is not the self-confidence of the average
man. The average man seeks certainty in the eyes of the onlooker and calls
that self-confidence. The warrior seeks impeccability in his own eyes and
calls that humbleness.
Tales of Power - C. Castaneda