Creating swap based ramdisks from rc.initdiskless by default

Ulrich Spörlein uspoerlein at
Thu Jan 22 09:46:37 PST 2009

On Thu, 22.01.2009 at 15:42:33 +0000, Igor Mozolevsky wrote:
> 2009/1/22 Attila Nagy <bra at>:
> > Igor Mozolevsky wrote:
> >> 2009/1/22 Attila Nagy <bra at>:
> >>> So the question is: what is the rationale behind creating malloc backed
> >>> disks by default, instead of swap-backed ones?
> >>
> >> Yes --- booting from DoC/CDROM/PXE with no HDD on the node...
> >
> > Did you read my e-mail?
> Yes, but why would you have swap enabled in the kernel on a system
> that cannot possibly swap?

That's not the point. AFAIK there's a kernel memory pool difference
between malloc(9) and swap-backed memory. You usually want to use the
latter, irregardless of an actual swap device, as the former is a scarce
ressource and shouldn't be used for RAM disks.

Ulrich Spörlein
None are more hopelessly enslaved than those who falsely believe they are free
-- Johann Wolfgang von Goethe

More information about the freebsd-current mailing list