Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 11:39:57 + Stefan Hajnoczi wrote: > On Fri, Nov 29, 2019 at 10:23:25AM +0100, Igor Mammedov wrote: > > On Thu, 28 Nov 2019 16:59:33 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > > > Hi, > > > > > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-13 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 10:23:25AM +0100, Igor Mammedov wrote: > On Thu, 28 Nov 2019 16:59:33 + > "Dr. David Alan Gilbert" wrote: > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > > Hi, > > > > > > Setting up shared memory for vhost-user is a bit complicated from > > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-01 Thread Paolo Bonzini
On 01/12/19 16:40, Marc-André Lureau wrote: >>> The original idea was to always support one NUMA node, so that you could >>> do "-numa node,memdev=..." to specify a memory backend with -object. >>> However, this is not possible anymore since >>> >>> if (!mc->cpu_index_to_instance_props || >>>

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-01 Thread Marc-André Lureau
Hi On Sat, Nov 30, 2019 at 12:23 AM Eduardo Habkost wrote: > > On Fri, Nov 29, 2019 at 10:31:36AM +0100, Paolo Bonzini wrote: > > On 28/11/19 17:10, Eduardo Habkost wrote: > > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > >> Hi, > > >> > > >> Setting up shared memory

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Eduardo Habkost
On Fri, Nov 29, 2019 at 10:31:36AM +0100, Paolo Bonzini wrote: > On 28/11/19 17:10, Eduardo Habkost wrote: > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > >> Hi, > >> > >> Setting up shared memory for vhost-user is a bit complicated from > >> command line, as it requires

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Gerd Hoffmann
Hi, > > Possibly, but if we're relying on shm_open choosing the path, then > > its harder for users to know what files to clean up when QEMU crashes > > or otherwise exits wthout a shm_unlink > > True, although I think you can call shm_unlink() right after > shm_open() that should limit the

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Paolo Bonzini
On 29/11/19 11:13, Igor Mammedov wrote: >> 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. > So far fall backs proved to be a pain to deal

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Paolo Bonzini
On 29/11/19 11:23, Igor Mammedov wrote: > [...] >> Therefore, I think instead of -mem-shared we should add a "-m >> memdev=..." option. This option: >> >> * would be mutually exclusive with both -mem-path >> >> * would be handled from allocate_system_memory_nonnuma. >> >> * could be mutually

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Fri, 29 Nov 2019 10:31:36 +0100 Paolo Bonzini wrote: > On 28/11/19 17:10, Eduardo Habkost wrote: > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > >> Hi, > >> > >> Setting up shared memory for vhost-user is a bit complicated from > >> command line, as it requires NUMA

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Fri, 29 Nov 2019 10:33:39 +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

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Paolo Bonzini
On 29/11/19 10:39, Daniel P. Berrangé wrote: > 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

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Daniel P . Berrangé
On Fri, Nov 29, 2019 at 01:31:11PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Nov 29, 2019 at 1:27 PM Daniel P. Berrangé > wrote: > > > > On Fri, Nov 29, 2019 at 11:30:51AM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Fri, Nov 29, 2019 at 11:03 AM Gerd Hoffmann wrote: > > > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Daniel P . Berrangé
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

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Marc-André Lureau
On Fri, Nov 29, 2019 at 1:42 PM Daniel P. Berrangé wrote: > > On Fri, Nov 29, 2019 at 01:31:11PM +0400, Marc-André Lureau wrote: > > Hi > > > > On Fri, Nov 29, 2019 at 1:27 PM Daniel P. Berrangé > > wrote: > > > > > > On Fri, Nov 29, 2019 at 11:30:51AM +0400, Marc-André Lureau wrote: > > > > Hi

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Paolo Bonzini
On 28/11/19 17:10, Eduardo Habkost wrote: > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: >> Hi, >> >> Setting up shared memory for vhost-user is a bit complicated from >> command line, as it requires NUMA setup such as: m 4G -object >>

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Thu, 28 Nov 2019 16:59:33 + "Dr. David Alan Gilbert" wrote: > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > Hi, > > > > Setting up shared memory for vhost-user is a bit complicated from > > command line, as it requires NUMA setup such as: m 4G -object > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Marc-André Lureau
Hi On Fri, Nov 29, 2019 at 1:27 PM Daniel P. Berrangé wrote: > > On Fri, Nov 29, 2019 at 11:30:51AM +0400, Marc-André Lureau wrote: > > Hi > > > > On Fri, Nov 29, 2019 at 11:03 AM Gerd Hoffmann wrote: > > > > > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > > > Hi, > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Paolo Bonzini
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

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Daniel P . Berrangé
On Fri, Nov 29, 2019 at 11:30:51AM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Nov 29, 2019 at 11:03 AM Gerd Hoffmann wrote: > > > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > > Hi, > > > > > > Setting up shared memory for vhost-user is a bit complicated from > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Thu, 28 Nov 2019 13:10:21 -0300 Eduardo Habkost wrote: > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > Hi, > > > > Setting up shared memory for vhost-user is a bit complicated from > > command line, as it requires NUMA setup such as: m 4G -object > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread Marc-André Lureau
Hi On Fri, Nov 29, 2019 at 11:03 AM Gerd Hoffmann wrote: > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > Hi, > > > > Setting up shared memory for vhost-user is a bit complicated from > > command line, as it requires NUMA setup such as: m 4G -object > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread Gerd Hoffmann
On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > Hi, > > Setting up shared memory for vhost-user is a bit complicated from > command line, as it requires NUMA setup such as: m 4G -object > memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa > node,memdev=mem. >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191128141518.628245-1-marcandre.lur...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 0/2] RFC: add -mem-shared option Type: series Message-id: 20191128141518.628245-1

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191128141518.628245-1-marcandre.lur...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi, > > Setting up shared memory for vhost-user is a bit complicated from > command line, as it requires NUMA setup such as: m 4G -object > memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa > node,memdev=mem. > >

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread Eduardo Habkost
On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > Hi, > > Setting up shared memory for vhost-user is a bit complicated from > command line, as it requires NUMA setup such as: m 4G -object > memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa > node,memdev=mem. >

[PATCH 0/2] RFC: add -mem-shared option

2019-11-28 Thread Marc-André Lureau
Hi, Setting up shared memory for vhost-user is a bit complicated from command line, as it requires NUMA setup such as: m 4G -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa node,memdev=mem. Instead, I suggest to add a -mem-shared option for non-numa setups, that will