[klibc] Early-userspace and swapping
John Zielinski
grim at undead.cc
Sun Nov 30 18:39:47 PST 2003
Bryan O'Sullivan wrote:
>>in initramfs it might me a good idea to have that memory swapped out
>>since I've seen a lot of embedded systems with little ram but lots of HD
>>space.
>>
>>
>
>Actually, I wouldn't expect that to be necessary. The most likely use
>of initramfs is to have just enough contents to make it possible to boot
>into a more normal userspace; we're not talking about more than a few
>hundred Kbytes. The main things that belong there from a functionality
>standpoint are udev, dm, and kinit, and they don't amount to much.
>
>
>
I believe I read somewhere that the memory used is not freed
automatically and you have to delete everything before mounting the real
root to reclaim the memory. Using tmpfs would mean all that gets
swapped to disk when not in use anymore. And my patch lets you remount
it later on to see what was going on there. Great way of storing
dynamic configuration data or a place to put large log files or
debugging dumps. I'm using it to store a videomode/monitor database.
This way I can modify the data and just cpio up the rootfs mount for the
next boot. It will probably be more useful for an elaborate graphical
installation program or disk utility where the real root is being
created/transformed/ghosted/etc but a swap partition exists.
It will probably be more useful for the people who want to make rootfs a
full blow root partition. They'd be able to load a constantly changing
root setup from network or cdrom but still be able to use the HD to
speed things up since root would be cahced to the swap drive.
I made it a kernel compile option so you can pick either ramfs or tmpfs
depending on what the requirements are.
John
More information about the klibc
mailing list