All of lore.kernel.org
 help / color / mirror / Atom feed
* Bootloader sequence with time prefix
@ 2013-05-20  7:07 Dhyan
  2013-05-20  7:49 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 7+ messages in thread
From: Dhyan @ 2013-05-20  7:07 UTC (permalink / raw)
  To: kernelnewbies

Dear all,

Is there any uboot config option in to print boot sequence with time
prefixes similar to kernel option CONFIG_PRINTK ?

Thanks & Regards
Dhyan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/af0c048a/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix
  2013-05-20  7:07 Bootloader sequence with time prefix Dhyan
@ 2013-05-20  7:49 ` Valdis.Kletnieks at vt.edu
  2013-05-20  8:25   ` Dhyan
  0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-05-20  7:49 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 20 May 2013 12:37:25 +0530, Dhyan said:

> Is there any uboot config option in to print boot sequence with time
> prefixes similar to kernel option CONFIG_PRINTK ?

I think you meant CONFIG_PRINTK_TIME there - and if that kernel option is
set, all your printks will show up with that, even stuff coming out of
early_printk().

Getting userspace to do it as well is a userspace problem, not a kernel
problem.  You'll have to fix multiple pieces - everything from your
syslog daemon (whichever one you use) to sysvinit/systemd/upstart or
whatever you boot with to output the right stuff on the console.  There's
almost certainly other stuff lurking as well, but your syslog and init
packages are going to be about 90% of it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/8fb32a59/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix
  2013-05-20  7:49 ` Valdis.Kletnieks at vt.edu
@ 2013-05-20  8:25   ` Dhyan
  2013-05-20  9:10     ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 7+ messages in thread
From: Dhyan @ 2013-05-20  8:25 UTC (permalink / raw)
  To: kernelnewbies

Dear* *Valdis,

Thank you for your quick reply, but what i need is "*time in bootloader
print output*". Kernel i already enabled and i am getting the time,

So i need time information like
*
*
[  Time XXXX  ] *U-Boot 1.1.4-gedeced79 (Feb  6 2012 - 09:27:11)*
*
*
[  Time XXX2  ] *Load address: 0x80e80000*
[  Time XXX3  ] *DRAM:  1024 MB*

*Hit any key to stop autoboot:  0 *
*kernel   @ 80008000 (3728760)*
*ramdisk  @ 81000000 (295902)*
*I2C read: I/O error*
*
*
*Starting kernel ...*
*
*
*Uncompressing Linux... done, booting the kernel.*

[    0.000000] Initializing cgroup subsys cpu   ===> Kernel I am already
getting timing information with CONFIG_PRINTK_TIME=y

Thanks & Regards
Dhyan



On Mon, May 20, 2013 at 1:19 PM, <Valdis.Kletnieks@vt.edu> wrote:

> On Mon, 20 May 2013 12:37:25 +0530, Dhyan said:
>
> > Is there any uboot config option in to print boot sequence with time
> > prefixes similar to kernel option CONFIG_PRINTK ?
>
> I think you meant CONFIG_PRINTK_TIME there - and if that kernel option is
> set, all your printks will show up with that, even stuff coming out of
> early_printk().
>
> Getting userspace to do it as well is a userspace problem, not a kernel
> problem.  You'll have to fix multiple pieces - everything from your
> syslog daemon (whichever one you use) to sysvinit/systemd/upstart or
> whatever you boot with to output the right stuff on the console.  There's
> almost certainly other stuff lurking as well, but your syslog and init
> packages are going to be about 90% of it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/393eccc4/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix
  2013-05-20  8:25   ` Dhyan
@ 2013-05-20  9:10     ` Valdis.Kletnieks at vt.edu
  2013-05-20  9:37       ` Dhyan
  0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-05-20  9:10 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 20 May 2013 13:55:25 +0530, Dhyan said:

> Thank you for your quick reply, but what i need is "*time in bootloader
> print output*". Kernel i already enabled and i am getting the time,

That will require fixing your bootloader, which may be more than slightly
interesting, as there's usually no timer services initialized by the
boot loader (so all you'll get is a bunch of [0.0000] headers).

What problem are you trying to solve by adding those timestamps? Maybe
there's a different way to solve your issue.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/2e987ddb/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix
  2013-05-20  9:10     ` Valdis.Kletnieks at vt.edu
@ 2013-05-20  9:37       ` Dhyan
  2013-05-20 14:40         ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 7+ messages in thread
From: Dhyan @ 2013-05-20  9:37 UTC (permalink / raw)
  To: kernelnewbies

Thank you Valdis !!!

I was working on to measure boottime for  bootime optimization.




On Mon, May 20, 2013 at 2:40 PM, <Valdis.Kletnieks@vt.edu> wrote:

> On Mon, 20 May 2013 13:55:25 +0530, Dhyan said:
>
> > Thank you for your quick reply, but what i need is "*time in bootloader
> > print output*". Kernel i already enabled and i am getting the time,
>
> That will require fixing your bootloader, which may be more than slightly
> interesting, as there's usually no timer services initialized by the
> boot loader (so all you'll get is a bunch of [0.0000] headers).
>
> What problem are you trying to solve by adding those timestamps? Maybe
> there's a different way to solve your issue.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/ce1090ac/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix
  2013-05-20  9:37       ` Dhyan
@ 2013-05-20 14:40         ` Valdis.Kletnieks at vt.edu
  2013-05-24 14:16           ` Bootloader sequence with time prefix (Kernelnewbies Digest, Vol 30, Issue 24) Lucas Rangit Magasweran
  0 siblings, 1 reply; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-05-20 14:40 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 20 May 2013 15:07:33 +0530, Dhyan said:

> I was working on to measure boottime for  bootime optimization.

The bootloader is probably not where you're going to find places to optimize.
It's got two jobs to do - load the kernel and load the initrd. And it's usually
pretty optimized to do that. About all you can do there is minimize the size of
the kernel and initrd so there's less to load (and move to SSD if you're really
hardcore).

The only other place to really win in the boot loader is to set the "hit any
key to go to the boot menu" timeout to 0 or 1 seconds.  Of course, this means
you have little (or zero) chance to enter an alternate kernel or commandline.

The *big* places for improving boot time:

1) Turn off services you don't need.  If you don't need NFS, don't waste
the 0.75 seconds or whatever it takes to load.

2) Use an 'init' process that can multithread better than the old sysvinit
system that runs one startup script at a time.  systemd (for all its other
faults, including a huge learning curve) does this, as does upstart (I'm told).
I've even seen one nice use of 'make -j' as a system startup program.

3) There's a nice program called 'bootchart' that will show you in a graphic
form where your boot time went.  Look at that, plus the kernel and related
message logs, to see where your pauses during system startup are.

4) If feasible, consider the use of an SSD rather than spinning disk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130520/0536f30f/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bootloader sequence with time prefix (Kernelnewbies Digest, Vol 30, Issue 24)
  2013-05-20 14:40         ` Valdis.Kletnieks at vt.edu
@ 2013-05-24 14:16           ` Lucas Rangit Magasweran
  0 siblings, 0 replies; 7+ messages in thread
From: Lucas Rangit Magasweran @ 2013-05-24 14:16 UTC (permalink / raw)
  To: kernelnewbies

On 05/20/2013 07:40 AM, Valdis.Kletnieks at vt.edu wrote:
> On Mon, 20 May 2013 15:07:33 +0530, Dhyan said:
>> I was working on to measure boottime for  bootime optimization.
> The bootloader is probably not where you're going to find places to 
> optimize.
> It's got two jobs to do - load the kernel and load the initrd. And 
> it's usually
> pretty optimized to do that. About all you can do there is minimize 
> the size of
> the kernel and initrd so there's less to load (and move to SSD if 
> you're really
> hardcore).
>
> The only other place to really win in the boot loader is to set the 
> "hit any
> key to go to the boot menu" timeout to 0 or 1 seconds.  Of course, 
> this means
> you have little (or zero) chance to enter an alternate kernel or 
> commandline.
Valdis is absolutely right.

In case the boot loader is not so optimized or you are trying to reduce 
the boot time by milliseconds try using a GPIO pin and a USB logic 
analyzer (e.g. Salea Logic). Toggle a pin at key places in the boot 
sequence to measure time. Setting up a timer and printing relative time 
over a serial port will negatively impact your boot time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130524/88394228/attachment-0001.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-24 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-20  7:07 Bootloader sequence with time prefix Dhyan
2013-05-20  7:49 ` Valdis.Kletnieks at vt.edu
2013-05-20  8:25   ` Dhyan
2013-05-20  9:10     ` Valdis.Kletnieks at vt.edu
2013-05-20  9:37       ` Dhyan
2013-05-20 14:40         ` Valdis.Kletnieks at vt.edu
2013-05-24 14:16           ` Bootloader sequence with time prefix (Kernelnewbies Digest, Vol 30, Issue 24) Lucas Rangit Magasweran
     [not found] <mailman.28.1369300221.2741.kernelnewbies@kernelnewbies.org>

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.