Re: Page-aligned executables (Was re: [9fans] Non-stack-based calling conventions)



On Feb 18, 2008 8:53 AM, Joel C. Salomon <joelcsalomon@xxxxxxxxx> wrote:

Ron mentioned that tidbit in his IWP9 talk about booting Plan 9 under
lguest. Lguest (or was it another virtualizer?) uses mmap so it can
load any arbitrary number of client kernels; 9l-produced ELF files
break that model.

And with the execute in place support (XIP) it gets more interesting,
and worth understanding, for reasons I'll mention below.

IF you have an ext2-based RAM file system, and XIP is compiled in,
then you can do the following: instead of mmap'ing the file, ext2
essentially says: "here's a pointer to the data you wanted, it's in
memory, just use it, don't page it in because that would be a copy
from memory to memory".

Why's it matter? First, boot time speed. A talk I saw on a Linux-based
car computer stated that their boot time goal was one second; Linux
was only allowed a very small fraction of this time to be ready (200
milliseconds IIRC); XIP made a difference between meeting the time
goals and not meeting them. Second, memory: on a 32 MB node, you
really don't want two copies of every binary.

So it's interesting to think about whether Plan 9 could boot a node in
200 ms on a StrongARM (500 mhz? I think so) or not. But I think XIP on
a small RAM disk would not be impossible.
ron
.



Relevant Pages

  • [PATCH 08/12] i386: Convert the boot time page tables to the kernels native format.
    ... So this patch rewrites the code that initializes our boot time page ... The default yes will allow the kernel to do irq load balancing. ... To make EFI call EFI runtime service in physical addressing mode we need ... * This is how much memory *in addition to the memory covered up to ...
    (Linux-Kernel)
  • Re: What File System supports Application XIP
    ... > You won't gain at runtime by using XIP though. ... I thought that when you XIPed from flash, ... directly back to the flash memory address. ... There shouldn't be a RAM ...
    (Linux-Kernel)
  • Re: WindowCE 5.0 + XIP Chain question!
    ... use XIP Chain. ... (NAND Flash, CF and etc), the bootloader will need to load the image into ... memory technology and the bootloader will need to load the whole bunch thing ... the new MDD/PDD dose not work well with bootpart.lib and BinFS; ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PATCH 2.6.21] cramfs: add cramfs Linear XIP
    ... >> The current xip stack relies on having struct page behind the memory ... This causes few impact on memory management, ... >> order to deal with vmas that don't have struct page behind. ... This is, as far as I can tell, not true for our xip mappings. ...
    (Linux-Kernel)
  • Re: umass to /dev/da* mapping
    ... Because devfs only relates to boot time and I want to deal with usb ... The allocation of device ... Normally my internal memory card reader is allocated da ... the user then has to do is mount /dev/usbstick on his mount point. ...
    (freebsd-questions)