[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored



On Mon, Mar 18, 2019 at 10:43:12PM +0100, Marek Marczykowski-Górecki wrote:
> On Mon, Mar 18, 2019 at 06:37:31PM +0100, Roger Pau Monne wrote:
> > Or if it's not possible to honor the hinted address an error is returned
> > instead. 
> 
> Just to be sure: MAP_FIXED will cause to map at specified address, even
> if something is mapped there already. From mmap(2):

That should be fine. We do want to replace an exiting mapping (which is
munmap before the mmap call), but it would have been nice to know when
something is already mapped, to detect programming error.

>     If the memory region specified by addr and len overlaps pages of any
>     existing mapping(s), then the overlapped part of the existing map‐
>     ping(s) will be discarded.  If the specified address cannot be used,
>     mmap() will fail.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.