[RFC PATCH 00/13] Introduce first class virtual address spaces
Matthew Wilcox
willy at infradead.org
Thu Mar 16 03:57:36 AEDT 2017
On Wed, Mar 15, 2017 at 09:51:31AM -0700, Andy Lutomirski wrote:
> > VAS segments on the other side allow sharing of pure in memory data by
> > arbitrary related tasks without the need of a file. This becomes especially
> > interesting if one combines VAS segments with non-volatile memory since one can keep
> > data structures in the NVM and still be able to share them between multiple tasks.
>
> What's wrong with regular mmap?
I think it's the usual misunderstandings about how to use mmap.
>From the paper:
Memory-centric computing demands careful organization of the
virtual address space, but interfaces such as mmap only give limited
control. Some systems do not support creation of address regions at
specific offsets. In Linux, for example, mmap does not safely abort if
a request is made to open a region of memory over an existing region;
it simply writes over it.
The correct answer of course, is "Don't specify MAP_FIXED". Specify the
'hint' address, and if you don't get it, either fix up your data structure
pointers, or just abort and complain noisily.
More information about the Linuxppc-dev
mailing list