Re: Large Shared Memory

Bret Orsburn (borsburn@codonics.com)
Wed, 30 Jun 1999 17:20:06 -0400


Peter Monta wrote:
>
> > More specifically, I need a contiguous region of memory that can be

I should have been more clear here. I don't need physically contiguous RAM, just
contiguous virtual addresses.

> > mapped into multiple processes (serially, not simultaneously) on a
> > uniprocessor system and persist beyond any particular process.
>
> One way is to reserve some memory outside of Linux with the
> "mem=" boot parameter, then mmap() this region of /dev/mem
> from user space. (I haven't tried this with 2.2, actually.)
> A description can be found under the "Using Shared Memory..."
> link at
>
> http://www.rtlinux.org/~rtlinux
>
> This technique is probably simplest if you don't need an
> allocator in the kernel for use by drivers.

We could use a method of that sort right now, but we're hoping to do dynamic
allocation in
the future. We'd like to make idle RAM available to the system to improve
typical system performance, but we need 100% confidence that we can reclaim the
full amount of logically contiguous memory when we need it.

> If you do need
> this, the other possibility is to use the bigphysarea patch; a
> 2.2 version can be found on Tom Leete's web page at
>
> http://web.mountain.net/~tleete/
>
> I've found bigphysarea to be really useful.

Am I right to infer that this patch provides large /physically/ contiguous
regions? If so, it may be stronger medicine than we need.

Rubini's 'scullv' driver just does a vmalloc in kernel space, and mmap sets up a
nopage
vm_op that maps that buffer to each callers' address space as required.
Unfortunately, the kernel API is a bit of a misfit for this approach, so
the driver contains some work-arounds. Those work-arounds make porting to
2.2 more than just a cookbook proposition.

> Cheers,
> Peter Monta pmonta@imedia.com
> Imedia Corp.

----

Bret Orsburn
borsburn@codonics.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/