Large array in KVM

Gerald Heinig gheinig at marvell.com
Fri Dec 7 02:11:53 PST 2007


Hi Sonja,

> Hi everyone.
> 
> I'm working on a kernel module that needs to maintain a large
structure
> in memory. As this structure could grow too big to be stored in
memory,
> it would be good to offload parts of it to the disk. What would be the
> best way to do this? Could using a memory-mapped file help?

How about implementing your code as a system call, which is called from
a process that maps a large file into memory, as you suggested above.
I presume you'd have to handle the question of whether or not your pages
are in memory yourself, ie. pretty much like any other system call.

Interesting question.

Cheers,
Gerald



More information about the freebsd-hackers mailing list