Skip to contentSkip to conversation

Linux patches for XIP on MPC8xx?

DISCUSSION Németh Márton 5 participants 5 messages Mar 23, 2010 – Mar 24, 2010

lore
Share & tools
lore
#2 lore raw
In reply to Németh Márton

Dear Márton Németh,

Quoted 4 lines · in message <[email protected]> you wrote:

I found your homepage at
http://www.denx.de/wiki/bin/view/DULG/ConfigureLinuxForXIP back from 2003. Was there any follow up of your patch for kernel 2.4.4?

There were very few tests done with later kernel versions, and in all practical system configurations we tested we found that XIP did not give real benefits. Usually execution from flash was slower than when running from RAM, and even booting a (inevitably uncompressed) kernel from flash is typically slower than loading a compressed image to RUM and booting from there.

So except for some highly specialized applications (you may also call these "exotic" configurations) XIP for the Linux kernel does not make much sense to me.

I am aware that there are reports which come to completely different conclusions - see for example http://www.elinux.org/Kernel_XIP ; but then look carefully - the examples come from hardware with really slow processors, which are probably not typical any more.

Actually this is the first thing you should check: the ratio of processor speed versus flash memory bandwidth versus RAM bandwidth. Today you can usually expect CPU clocks way over 400 MHz, and many systems use DDR, while NOR flash speed has noch changed much.

Also check if it is possible to map the flash memory cached for your system (which you definitly want when using XIP from flash); this may prevent some flash access methods from working.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Doubt isn't the opposite of faith; it is an element of faith.
- Paul Tillich, German theologian and historian
#3 lore raw
Quoted 6 lines · Wolfgang Denk

There were very few tests done with later kernel versions, and in all practical system configurations we tested we found that XIP did not give real benefits. Usually execution from flash was slower than when running from RAM, and even booting a (inevitably uncompressed) kernel from flash is typically slower than loading a compressed image to RUM and booting from there.

                                                                     ^

Missing an H here :-)

Cheers,
Ben.

#4 lore raw
In reply to Wolfgang Denk

Hi,

Quoted 6 lines

There were very few tests done with later kernel versions, and in all practical system configurations we tested we found that XIP did not give real benefits. Usually execution from flash was slower than when running from RAM, and even booting a (inevitably uncompressed) kernel from flash is typically slower than loading a compressed image to RUM and booting from there.

at some point we were testing some hybrid approaches for XIP and that gave some nice results.

First of all, the kernel should not necessarily be uncompressed. Because .data and friend sections are copied to RAM anyway, you can compress them.

Besides, we had the "weird" XIP kernel version with only run-once code run as XIP (like .initdata), copying the rest of kernel to RAM in the background while initializing things, and it was really fast and didn't produce performance penalty on the further execution.

Quoted 3 lines

So except for some highly specialized applications (you may also call these "exotic" configurations) XIP for the Linux kernel does not make much sense to me.

Well, I'd put it this way: plain XIP usage is obsolete in the most cases, but the idea is still viable if you apply it right :)

Thanks,
Vitaly