Re: [patch, feature] nonlinear mappings, prefaulting support, 2.5.42-F8

Jamie Lokier
2002-10-15T01:18:07Z

I have a couple of suggestions/questions that may make this syscall
more generally useful.

Ingo Molnar wrote:
> * @prot: new protection bits of the range

So, you can change the protection per page without thousands of vmas?
Some garbage collectors could take advantage of that.

> Since all the mapping information of nonlinear vmas lives in the
> pagetables, they either have to be MAP_LOCKED (for databases or
> virtualization software) or need a special SIGBUS handler to
> reinstall mappings across swapping (for more complex uses such as
> memory debuggers).

I like the SIGBUS. Am I correct to assume that, when there is memory
pressure, some pages are evicted from memory and all accesses to those
pages from userspace will raise SIBUS until the mapping is
reastablished? Am I correct to assume this works fine on /dev/shm files?

This has uses in programs that cache data that is faster to
recalculate than to swap. For example, a vector image displayer might
prefer to re-render parts of an image than to wait for parts of a
large cached image to page in. A JIT run-time compiler might prefer
to regenerate code fragments on demand than to wait for paged out,
cached code fragments to page back in.

I think that the above two features are already supported by your
patch, by simply using a /dev/shm file as the backing store. Ingo,
can you confirm this?

Thanks,
-- Jamie