linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* value of XIP?  and whether it works with 2.6 kernel?
@ 2004-08-24 15:44 Robert P. J. Day
  2004-08-25  7:55 ` Wolfgang Denk
  2004-08-25 11:22 ` Mark Chambers
  0 siblings, 2 replies; 8+ messages in thread
From: Robert P. J. Day @ 2004-08-24 15:44 UTC (permalink / raw)
  To: Embedded Linux PPC list


   working with a recent post to the MTD mailing list, and reading the
wiki part on XIP over at www.denx.de, i'm curious about who's using
XIP with the 2.6 kernel, specifically with the 8xx boards.

   as i read it from david w's post on the MTD list, XIP has limited
value since flash is noticeably more expensive than RAM anyway.

   so, thoughts?  who's actually using this?  and it's not clear from
the DENX page that there's a patch for the 2.6 kernel -- that page
refers specifically to 2.4.

   anyway, i'm just curious, wondering whether it would be worth giving
it a try, just for the entertainment value.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP? and whether it works with 2.6 kernel?
  2004-08-24 15:44 value of XIP? and whether it works with 2.6 kernel? Robert P. J. Day
@ 2004-08-25  7:55 ` Wolfgang Denk
  2004-08-25 11:22 ` Mark Chambers
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-08-25  7:55 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list


In message <Pine.LNX.4.60.0408241141110.6489@localhost.localdomain> you wrote:
>
>    as i read it from david w's post on the MTD list, XIP has limited
> value since flash is noticeably more expensive than RAM anyway.

The fact that flash is more expensive does NOT mean that XIP  has  no
use.  Actually  this  is nonsense. There are several good reasons why
using XIP may be a good idea. For example, in some security  critical
environments users are much more happy to execute code from read-only
storage. Also boot time may be an issue.

>    so, thoughts?  who's actually using this?  and it's not clear from
> the DENX page that there's a patch for the 2.6 kernel -- that page
> refers specifically to 2.4.

We use it on 2.4 with 8xx only (so far).

>    anyway, i'm just curious, wondering whether it would be worth giving
> it a try, just for the entertainment value.

Go on...

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
You can observe a lot just by watchin'.                  - Yogi Berra

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-24 15:44 value of XIP? and whether it works with 2.6 kernel? Robert P. J. Day
  2004-08-25  7:55 ` Wolfgang Denk
@ 2004-08-25 11:22 ` Mark Chambers
  2004-08-25 15:32   ` Dan Malek
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Chambers @ 2004-08-25 11:22 UTC (permalink / raw)
  To: Robert P. J. Day, Embedded Linux PPC list


>
>    as i read it from david w's post on the MTD list, XIP has limited
> value since flash is noticeably more expensive than RAM anyway.
>

The main value, I believe, is as part of a rapid boot setup - you can
avoid the decompress and copy phase.

Mark Chambers

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-25 11:22 ` Mark Chambers
@ 2004-08-25 15:32   ` Dan Malek
  2004-08-25 16:10     ` Mark Chambers
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Malek @ 2004-08-25 15:32 UTC (permalink / raw)
  To: Mark Chambers; +Cc: Embedded Linux PPC list, Robert P. J. Day


On Aug 25, 2004, at 7:22 AM, Mark Chambers wrote:

> The main value, I believe, is as part of a rapid boot setup - you can
> avoid the decompress and copy phase.

The XIP has little effect on this.  Wolfgang hit the important points.
I originally did XIP on the 8xx many years ago for an embedded
appliance that was DRAM challenged.  It saved a little memory,
but along with it came the pinned TLB which helped a little with
performance.

The kernel code was tightly integrated with the initialization
code.  This is where the start up time was reduced.  The
initialization code was minimal, and it also immediately put
up some graphics on the screen which made the user
aware the appliance was "doing something."  After minimal
part set up, the kernel then started running was modified
to continue the screen update as it booted.  In the end, it
really didn't boot much faster, but at least the activity on
the screen was psychologically useful :-)

The three big things that slow down the boot process are
serial console output (which can be many seconds), timeouts
in the boot code waiting for user input, and diagnostic
tests (testing memory, checksum of images in flash, etc.)

With the large amount of memory in all systems these days,
XIP does nothing to help that.  The XIP on its own doesn't
do anything to speed up the operation of the system.   In
the whole of a system design XIP can be a useful tool, but
just enabling the option without any larger problem to
solve is just entertaining, not very useful :-)

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-25 15:32   ` Dan Malek
@ 2004-08-25 16:10     ` Mark Chambers
  2004-08-25 17:01       ` Dan Malek
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Chambers @ 2004-08-25 16:10 UTC (permalink / raw)
  To: Dan Malek; +Cc: Embedded Linux PPC list, Robert P. J. Day


>
> On Aug 25, 2004, at 7:22 AM, Mark Chambers wrote:
>
> > The main value, I believe, is as part of a rapid boot setup - you can
> > avoid the decompress and copy phase.
>

Dan Malek responded:

> The XIP has little effect on this.  Wolfgang hit the important points.
> I originally did XIP on the 8xx many years ago for an embedded
> appliance that was DRAM challenged.  It saved a little memory,
> but along with it came the pinned TLB which helped a little with
> performance.
>

I guess I wasn't basing my comment exclusively on 8xx, but thinking
more of the general linux quick boot work being done, as in this
paper from the linux 2004 symposium (see section 4):
http://www.finux.org/Reprints/Reprint-Bird-OLS2004.pdf
So, in other words, maybe XIP will come back again?


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-25 16:10     ` Mark Chambers
@ 2004-08-25 17:01       ` Dan Malek
  2004-08-26  1:27         ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Malek @ 2004-08-25 17:01 UTC (permalink / raw)
  To: Mark Chambers; +Cc: Embedded Linux PPC list, Robert P. J. Day


On Aug 25, 2004, at 12:10 PM, Mark Chambers wrote:

> http://www.finux.org/Reprints/Reprint-Bird-OLS2004.pdf

That's a very misleading paper, and if you read it carefully
actually supports what I said.

In total, XIP saved them about 80 mS, which is the time it
takes to copy a kernel to RAM.  Nothing else in the
paper is related to XIP.  You don't have to use a compressed
kernel in any environment, and most of the paper talked
about reducing other boot up delays.  the XIP is an
insignificant player in boot up time, it does have other
value as Wolfgang pointed out.

The kernel XIP from Flash isn't very hard to implement,
it is just very board configuration dependent.  All you
need is a proper linker command file for your board
and a couple of start up MMU hacks......for PowerPC.

Thanks.

	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-25 17:01       ` Dan Malek
@ 2004-08-26  1:27         ` David Woodhouse
  2004-08-26  3:45           ` Dan Malek
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2004-08-26  1:27 UTC (permalink / raw)
  To: Dan Malek; +Cc: Mark Chambers, Embedded Linux PPC list, Robert P. J. Day


On Wed, 2004-08-25 at 13:01 -0400, Dan Malek wrote:
> The kernel XIP from Flash isn't very hard to implement,
> it is just very board configuration dependent.  All you
> need is a proper linker command file for your board
> and a couple of start up MMU hacks......for PowerPC.

It's a little bit harder than that if you want to actually write to the
same flash chip you're running from. :)

Not a _lot_ harder though -- you just put the flash-mangling routines
into a separate section in RAM and disabling interrupts while you're in
them (you can poll for interrupts, suspend pending writes/erases and
handle the interrupts without particularly evil latencies).

I did it a long time ago -- just couldn't ever see the point in merging
it.

--
dwmw2


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: value of XIP?  and whether it works with 2.6 kernel?
  2004-08-26  1:27         ` David Woodhouse
@ 2004-08-26  3:45           ` Dan Malek
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Malek @ 2004-08-26  3:45 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Embedded Linux PPC list, Robert P. J. Day, Mark Chambers


On Aug 25, 2004, at 9:27 PM, David Woodhouse wrote:

> It's a little bit harder than that if you want to actually write to the
> same flash chip you're running from. :)

Many of the "modern" parts will let you do that.  Load a buffer,
start the update, come back later to check it.  The MTD may
need some updates to do that, but I'm sure you're up for it :-)
Software upgrade of embedded systems is a totally different
discussion.  Having multiple images that you need to choose
based upon validity, dates, failure to boot previously, etc. are
all things that significantly increase the boot time. :-)

	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2004-08-26  3:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-24 15:44 value of XIP? and whether it works with 2.6 kernel? Robert P. J. Day
2004-08-25  7:55 ` Wolfgang Denk
2004-08-25 11:22 ` Mark Chambers
2004-08-25 15:32   ` Dan Malek
2004-08-25 16:10     ` Mark Chambers
2004-08-25 17:01       ` Dan Malek
2004-08-26  1:27         ` David Woodhouse
2004-08-26  3:45           ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).