[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/2] RFC: add -mem-shared option
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 0/2] RFC: add -mem-shared option |
Date: |
Fri, 29 Nov 2019 09:39:41 +0000 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Fri, Nov 29, 2019 at 10:33:39AM +0100, Paolo Bonzini wrote:
> On 29/11/19 10:27, Daniel P. Berrangé wrote:
> >> Yes, with a fallback path currently using a temporary file under /tmp
> >> (we may want to use shm_open() instead, or a different location such
> >> as XDG_RUNTIME_DIR? - and use O_TMPFILE)
> > We can't assume either /tmp or XDG_RUNTIME_DIR is on tmpfs as that is no
> > where near standard across all OS distros, and even if on tmpfs these
> > dirs can be size limited to a significant subset of available RAM. IOW
> > we can't safely use them unless explicitly told to.
>
> Agreed, mkstemp+shm_open seems better. Perhaps this could be done in
> hostmem-memfd.c though, basically as a fallback option? In principle
> one could even use getmntent to search for a hugetlbfs mount.
With mkstemp you still need to pick a location, and I don't think it
is clear there is a reliable choice that will always work.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [PATCH 0/2] RFC: add -mem-shared option, (continued)
- Re: [PATCH 0/2] RFC: add -mem-shared option, no-reply, 2019/11/28
- Re: [PATCH 0/2] RFC: add -mem-shared option, no-reply, 2019/11/29
- Re: [PATCH 0/2] RFC: add -mem-shared option, Gerd Hoffmann, 2019/11/29
- Re: [PATCH 0/2] RFC: add -mem-shared option, Paolo Bonzini, 2019/11/29
- Re: [PATCH 0/2] RFC: add -mem-shared option,
Daniel P . Berrangé <=
- Re: [PATCH 0/2] RFC: add -mem-shared option, Paolo Bonzini, 2019/11/29
- Re: [PATCH 0/2] RFC: add -mem-shared option, Igor Mammedov, 2019/11/29
- Re: [PATCH 0/2] RFC: add -mem-shared option, Paolo Bonzini, 2019/11/29