Re: Embedded Linux Boot Time Poll

2010-10-24 Thread Andrew Murray
Hi,

Thanks all for your very valuable input. This seems to be an
interesting topic that generates a lot of interest!

I've updated my statement - does this reflect your views?

"Given an unoptimised system based on embedded Linux with a clearly
defined purpose - The amount of boot time it takes to reach that
required state of functionality can be reduced by specialising the
software stack to those needs. Specialisation may involve
removing/deferring unrequired functionality/support and optimising
required functionality."

I've emphasised the focus of the statement to refer to a Linux based
system and so by doing this optimisation then refers to the system as
a whole including bootloaders, choice of filesystems, user space
initialisation, etc.

I've also defined boot time as the amount of time required to reach a
useful state of functionality - in other words meeting only the needs
of the application which provides the products purpose.

By remove functionality/support - I mean removing support for device
drivers not required and also removing unused functionality (which may
be things like removing kallsyms, ipautoconfig, printk support, etc).
And by 'optimise required functionality' - I think this can have a
broad meaning and include system design decisions such as how
userspace is initialised - e.g. the app could be the init process,
optimising flash timings, using a more optimal filesystem, removing
probes (if you know the hardware will always been there), etc.

And I've tried to use relative terms rather than absolute terms - so
the comparison is against an unoptimised system (e.g. perhaps a
customer has a pre-provided BSP and they have little knowledge of how
to optimise it and remove things via KConfig etc).

Thanks,

Andrew Murray

On 22 October 2010 00:20, Andrew Murray  wrote:
> Hello,
>
> I'm performing some research [for a CELF presentation] into reducing
> boot time on embedded systems and would like to see if the embedded
> community agree with the following statement as to why Linux
> [arguably] takes so long in the first place for an unoptimised system:
>
> "Linux is general purpose, convenient and flexible. As it's general
> purpose it's likely to contain un-required functionality which results
> in more initialisation and a larger image size. As it's convenient and
> flexible it will spent time discovering devices and verifying their
> existence."
>
> Do you largely agree or disagree?
> Also do you believe that boot time isn't the highest priority when it
> comes to improving the kernel?
>
> Thanks,
>
> Andrew Murray
>



-- 
Andrew Murray, Embedded Linux Group
MPC Data Limited
e-mail: amur...@mpc-data.co.uk  web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600               fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710665

MPC Data Limited is a company registered in England and Wales with
company number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire, BA14 7FJ
VAT no: 850625238

The information in this email and in the attached documents is
confidential and may be
legally privileged. Any unauthorized review, copying, disclosure or
distribution is
prohibited and may be unlawful. It is intended solely for the
addressee. Access to this
email by anyone else is unauthorized. If you are not the intended
recipient, please
contact the sender by reply email and destroy all copies of the
original message. When
addressed to our clients any opinions or advice contained in this
email is subject to
the terms and conditions expressed in the governing contract.
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Embedded Linux Boot Time Poll

2010-10-24 Thread Robert Schwebel
Hello Andrew,

On Fri, Oct 22, 2010 at 12:20:50AM +0100, Andrew Murray wrote:
> I'm performing some research [for a CELF presentation] into reducing
> boot time on embedded systems and would like to see if the embedded
> community agree with the following statement as to why Linux
> [arguably] takes so long in the first place for an unoptimised system:
>
> "Linux is general purpose, convenient and flexible. As it's general
> purpose it's likely to contain un-required functionality which results
> in more initialisation and a larger image size. As it's convenient and
> flexible it will spent time discovering devices and verifying their
> existence."
>
> Do you largely agree or disagree?  Also do you believe that boot time
> isn't the highest priority when it comes to improving the kernel?

I second what the others have already written. With a resonably tuned
system it is possible to gain boot times of < 0.5 s into the Linux
userspace on a 532 MHz MX35 (ARM1136).

What highly matters if the use case, which in turn influences what can
be done to decrease the boot time.

- If a distribution is tuned to "run everywhere", it has to do a lot of
  probing, which needs time (i.e. a general purpose distribution on an
  ARM or PowerPC). In turn, you can easily install almost everything on
  such a system

- If a system can be optimized for a special scenario (i.e. a machine
  operator terminal), you can configure away almost all unrequired
  functionality. In turn, it may be difficult to install random software
  parts on such a system.

It's more a matter of paradigms.

I assume we'll have nice boot time discussons at ELC-E, I also have a
talk there concering this topic :-)

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Embedded Linux Boot Time Poll

2010-10-22 Thread Chris Simmonds

On 22/10/10 00:20, Andrew Murray wrote:

Hello,

I'm performing some research [for a CELF presentation] into reducing
boot time on embedded systems and would like to see if the embedded
community agree with the following statement as to why Linux
[arguably] takes so long in the first place for an unoptimised system:

"Linux is general purpose, convenient and flexible. As it's general
purpose it's likely to contain un-required functionality which results
in more initialisation and a larger image size. As it's convenient and
flexible it will spent time discovering devices and verifying their
existence."

Do you largely agree or disagree?
Also do you believe that boot time isn't the highest priority when it
comes to improving the kernel?

Thanks,

Andrew Murray


From my experience, your statements are broadly correct. As has been 
pointed out, there are techniques to optimise the boot time in a system, 
but they are not very well known to the majority of engineers working on 
embedded Linux devices. The situation is not helped by the poor choices 
made by many board and chip level vendors who bundle a Linux tool chain 
and rootfs with their hardware. So, I believe that it is mostly a 
problem of education, starting with the chip- and board- vendors.


Bye for now
Chris Simmonds
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Embedded Linux Boot Time Poll

2010-10-22 Thread alucero

Hi Andy,

Talking about boot time with Linux needs to cover how user space  
initialization is done. I'm talking about init runlevels and all of  
this inherited functionality from System V. This is a software issue  
and although it worked fine for years in servers and desktop systems,  
it is not the right option for embedded systems dedicated to final  
users like mobile phones, cameras, minilaptos, tablets, ... .


As you probably know, there are people working in this specific part  
trying to improve the way Linux is doing this things like avoiding  
shell scripts as much as possible and doing things in parallel when  
dependencies do not exist.


By other hand, some embedded systems, those gaining main attention,  
are clearly closer to generic purpose Linux systems as we know them  
and it will be even more difuse in the close future. But generic  
purpose and boot time reduction should not be incompatible.



Andrew Murray  ha escrito:


Hello,

I'm performing some research [for a CELF presentation] into reducing
boot time on embedded systems and would like to see if the embedded
community agree with the following statement as to why Linux
[arguably] takes so long in the first place for an unoptimised system:

"Linux is general purpose, convenient and flexible. As it's general
purpose it's likely to contain un-required functionality which results
in more initialisation and a larger image size. As it's convenient and
flexible it will spent time discovering devices and verifying their
existence."

Do you largely agree or disagree?
Also do you believe that boot time isn't the highest priority when it
comes to improving the kernel?

Thanks,

Andrew Murray
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Embedded Linux Boot Time Poll

2010-10-22 Thread Steven J. Magnani
Andrew Murray  wrote:

> Hello,
> 
> I'm performing some research [for a CELF presentation] into reducing
> boot time on embedded systems and would like to see if the embedded
> community agree with the following statement as to why Linux
> [arguably] takes so long in the first place for an unoptimised system:
> 
> "Linux is general purpose, convenient and flexible. As it's general
> purpose it's likely to contain un-required functionality which
> results in more initialisation and a larger image size.

I think if you are going to use "more" and "larger" you need to define
your point of comparison. i.e., vs. bare metal? eCos? WinCE? An
incandescent light bulb?  :)

Kconfig goes a long way towards allowing developers to prune extraneous
code from the kernel. Also great pains have been taken to optimize away
calls that aren't needed in certain configurations (i.e. spinlocks on 
uniprocessor systems).

> As it's convenient and flexible it will spent time discovering devices 
> and verifying their existence."
> 
> Do you largely agree or disagree?

I largely disagree mainly because I don't think anyone would use an
"unoptimised" kernel in an embedded device. Kernels can be built to look
for only the subset of devices the system supports (platform bus, device
tree, etc.).

> Also do you believe that boot time isn't the highest priority when it
> comes to improving the kernel?

There was some discussion of this at ELC 2009. Andre Puschmann gave a
presentation which you can find here:
http://tree.celinuxforum.org/CelfPubWiki/ELC2009Presentations?action=AttachFile&do=view&target=ELC09_boottime_reduction.pdf

Different classes of embedded devices may have different priorities. In
some cases there are regulatory requirements; David Woodhouse pointed
out that for mobile phones, it must be possible to make an emergency
call within X seconds. In other cases the question is one of "user
experience"; for devices like an iTouch, users can become accustomed to
a relatively 'long' boot. In other cases users expect a device to behave
like an incandescent light and be usable more or less immediately, and
have a frustration level that increases exponentially with
time-until-usability.

It might help the discussion to consider some alternative priorities.
Many of these have a userland dimension.
* Stability (i.e. MTBF for long-running systems)
* Power management
* Robustness against sudden removal of power
* Shutdown time
* Solid-state storage
* Security
* Field failure analysis (i.e. crash dumps)
* Others?

For the product I'm involved with, robustness is probably the top
concern, with boot time a close second.

Regards,

 Steven J. Magnani   "I claim this network for MARS!
 www.digidescorp.com  Earthling, return my space modulator!"

 #include 


--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Embedded Linux Boot Time Poll

2010-10-21 Thread Nicolas Pitre
On Fri, 22 Oct 2010, Andrew Murray wrote:

> Hello,
> 
> I'm performing some research [for a CELF presentation] into reducing
> boot time on embedded systems and would like to see if the embedded
> community agree with the following statement as to why Linux
> [arguably] takes so long in the first place for an unoptimised system:
> 
> "Linux is general purpose, convenient and flexible. As it's general
> purpose it's likely to contain un-required functionality which results
> in more initialisation and a larger image size. As it's convenient and
> flexible it will spent time discovering devices and verifying their
> existence."
> 
> Do you largely agree or disagree?

I agree with the above, as long as the "unoptimized" keyword is also 
included in that statement.  By nature, embedded systems are normally 
well defined and the kernel build configuration options are sufficiently 
detailed so that a highly optimized kernel with only the 
required functionalities can be easily produced.

> Also do you believe that boot time isn't the highest priority when it
> comes to improving the kernel?

Well, I don't think the kernel itself needs to be much improved for boot 
time.  This is more a system design issue nowadays i.e. optimizing the 
kernel configuration, proper partitioning of drivers between modules and 
built-in, selection of a storage media for the kernel image to boot, 
bootloader optimizations, user space optimizations, etc.  It is well 
possible to achieve a short kernel boot to start interaction with the 
user quickly, and postpone the probing of peripherals such as USB 
devices in the background only when user space is started.

That also depends on what your definition of "boot time" is.  Is it the 
time from power up to the moment when user space starts executing?  Or 
is it the time before the system is fully operational?  And what is the 
meaning of "fully operational"?  Is it when the display is working and 
user input is possible, or is it when network connectivity is fully 
established?  And even then, does "network connectivity fully 
established" mean that the link is up with an IP address, or does this 
mean that you are connected to a specific application server or a 
particular web site with the required data downloaded?  This is not as 
straight forward as it may seem.

If boot time is only the time required for user space to start 
executing, then on some embedded system this can be made to work in less 
than a second.  Is this criterion (from power up to user space) useful?  
That depends on the application.


Nicolas








> 
> Thanks,
> 
> Andrew Murray
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


Embedded Linux Boot Time Poll

2010-10-21 Thread Andrew Murray
Hello,

I'm performing some research [for a CELF presentation] into reducing
boot time on embedded systems and would like to see if the embedded
community agree with the following statement as to why Linux
[arguably] takes so long in the first place for an unoptimised system:

"Linux is general purpose, convenient and flexible. As it's general
purpose it's likely to contain un-required functionality which results
in more initialisation and a larger image size. As it's convenient and
flexible it will spent time discovering devices and verifying their
existence."

Do you largely agree or disagree?
Also do you believe that boot time isn't the highest priority when it
comes to improving the kernel?

Thanks,

Andrew Murray
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html