qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag


From: Roger Pau Monné
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored
Date: Thu, 21 Mar 2019 11:08:15 +0900
User-agent: NeoMutt/20180716

On Tue, Mar 19, 2019 at 02:16:44PM +0000, Anthony PERARD wrote:
> 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.

FreeBSD has MAP_EXCL to be used in conjunction with MAP_FIXED, and
Linux has MAP_FIXED_NOREPLACE to achieve this behavior. I think the
current fix is fine for now, but we might want to look into using
those if further issues are found.

Thanks, Roger.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]