Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 14:02:46 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        lyndon@orthanc.ab.ca
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: creating non-swap backed md(4) devices
Message-ID:  <3C699106.2769F1D3@mindspring.com>
References:  <200202122126.g1CLQke22875@orthanc.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Lyndon Nerenberg wrote:
> I'm trying to figure out how to create a large (512 MB) md(4) filesystem
> that isn't swap backed. The md(4) manpage hints at a type 'md_image'
> load module, but doesn't say anything about how to create one and have
> it loaded at boot time. My searches through the mailing list archives
> and handbook didn't turn up anything. Could someone who has done this
> please let me know how it's done? Thanks, and I'll summarize if I
> receive any useful responses.

It puts the md image into the kernel address space itself.

The resulting md is not writable.

I'm correct in assuming that you are trying to allocate a
large chunk of physical memory that is outside the kernel
management primitives, which would include the ability to
swap the data to a backing stor for swappable RAM?  The
*only* way to get around this is to not use swappable RAM.

It sounds like what you want is wired memory.  If so, you
should write a simple device driver that exposes a block
of kernel memory as if it were a disk device, and do the
memory allocation for the device in machdep.c, just as if
you were allocating a new zone.  It's pretty trivial, as
kernel hacks go.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C699106.2769F1D3>