All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: ehabkost@redhat.com, Cornelia Huck <cohuck@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	gongsu@us.ibm.com, Stefan Hajnoczi <stefanha@redhat.com>,
	marcandre.lureau@redhat.com, pbonzini@redhat.com,
	rth@twiddle.net
Subject: Re: [PATCH REPOST v3 78/80] hostmem: fix strict bind policy
Date: Tue, 28 Jan 2020 13:07:40 +0100	[thread overview]
Message-ID: <20200128130740.2f075e04@redhat.com> (raw)
In-Reply-To: <20200127154145.42e5a197.pasic@linux.ibm.com>

On Mon, 27 Jan 2020 15:41:45 +0100
Halil Pasic <pasic@linux.ibm.com> wrote:

> On Mon, 27 Jan 2020 08:39:25 +0100
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> > On Fri, 24 Jan 2020 20:17:48 +0100
> > Halil Pasic <pasic@linux.ibm.com> wrote:
> >   
> > > On Thu, 23 Jan 2020 12:38:43 +0100
> > > Igor Mammedov <imammedo@redhat.com> wrote:
> > >   
> > > > With main RAM now converted to hostmem backends, there is no
> > > > point in keeping global mem_prealloc around, so alias
> > > >  -mem-prealloc to "memory-backend.prealloc=on"
> > > > machine compat[*] property and make mem_prealloc a local
> > > > variable to only stir registration of compat property.
> > > > 
> > > > *) currently user accessible -global works only with DEVICE
> > > >    based objects and extra work is needed to make it work
> > > >    with hostmem backends. But that is convenience option
> > > >    and out of scope of this already huge refactoring.
> > > >    Hence machine compat properties were used.    
> > > 
> > > AFAIU because of this something like
> > > -global memory-backend-file.share=on
> > > (as proposed by
> > > https://lists.nongnu.org/archive/html/qemu-devel/2019-12/msg00531.html)
> > > can not be used to make the main RAM shared (e.g. for vhost on s390x).
> > > Or am I wrong? If not, is -global still the way we want to make this work
> > > for non-numa machines, or did I miss updates?  
> > 
> > one should be able to use memory-backend property to make it work
> > instead of -m convenience option in s390 case.  
> 
> Thank you very much for the quick response!
> 
> Honestly, I overlooked the memory-backed machine property, but regardless
> of that -machine,memory-backend=id *does not seem viable* at the
> moment.
> 
> My understanding is that one has to do something like:        
> -machine type=s390-ccw-virtio,memory-backend=mem \
> -object memory-backend-file,id=mem,size=2G,mem-path=/dev/shm/virtiofs.shm,share=on \
> 
> I get 
> qemu: : Device 'mem' not found
> because the 'memory-backend-*' objects are delayed,
> i.e. !object_create_initial(), and at the time when
> machine_set_property() tries to look the memory-backend up the
> memory-backend is not yet created.
> 
> For why delayed, object_create_initial()  has a comment:
> 
>     /* Memory allocation by backends needs to be done
>      * after configure_accelerator() (due to the tcg_enabled()
>      * checks at memory_region_init_*()).
>      *
>      * Also, allocation of large amounts of memory may delay
>      * chardev initialization for too long, and trigger timeouts
>      * on software that waits for a monitor socket to be created
>      * (e.g. libvirt).
>      */
>     if (g_str_has_prefix(type, "memory-backend-")) {
> 
> Or, am I using it wrong?

You right, 
I even had an alternative impl. earlier that used string property
instead of link, but later I forgot about this complication
and simplified it to link property which works fine but only
for -m case.

It's necessary to rewrite patches 2-4/80 to use string property
for memory-backend which will be used for delayed backend access
at machine_run_board_init() time.

I'll CC you on relevant patches for reviewing when I post v4.

> > 
> > As for -global for objects (or more limited variant for memory-backends),
> > it needs more work to support objects. (that's mostly policy decision)
> >   
> 
> I agree.
> 
> Regards,
> Halil
> 



  reply	other threads:[~2020-01-28 12:08 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 11:37 [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 01/80] numa: remove deprecated -mem-path fallback to anonymous RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 02/80] machine: introduce memory-backend property Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 03/80] machine: alias -mem-path and -mem-prealloc into memory-foo backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 04/80] machine: introduce convenience MachineState::ram Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 05/80] initialize MachineState::ram in NUMA case Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 06/80] alpha:dp264: use memdev for RAM Igor Mammedov
2020-01-23 15:07   ` BALATON Zoltan
2020-01-24  8:13     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 07/80] arm/aspeed: actually check RAM size Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 08/80] arm/aspeed: use memdev for RAM Igor Mammedov
2020-01-23 12:08   ` Joel Stanley
2020-01-23 11:37 ` [PATCH REPOST v3 09/80] arm/collie: " Igor Mammedov
2020-01-23 12:27   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 10/80] arm/cubieboard: " Igor Mammedov
2020-01-23 12:30   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 11/80] arm/digic_boards: " Igor Mammedov
2020-01-23 12:32   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 12/80] arm/highbank: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 13/80] arm/imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-23 12:39   ` Andrew Jones
2020-01-23 14:32     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 14/80] arm/imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 15/80] arm/integratorcp: " Igor Mammedov
2020-01-23 12:40   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 16/80] arm/kzm: drop RAM size fixup Igor Mammedov
2020-01-23 22:23   ` Chubb, Peter (Data61, Kensington NSW)
2020-01-24  8:10     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 17/80] arm/kzm: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 18/80] arm/mcimx6ul-evk: " Igor Mammedov
2020-01-23 12:50   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 19/80] arm/mcimx7d-sabre: " Igor Mammedov
2020-01-23 12:51   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 20/80] arm/mps2-tz: " Igor Mammedov
2020-01-23 12:59   ` Andrew Jones
2020-01-23 13:39     ` Igor Mammedov
2020-01-23 14:37       ` Andrew Jones
2020-01-23 14:37   ` [PATCH v4 " Igor Mammedov
2020-01-23 14:47     ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 21/80] arm/mps2: " Igor Mammedov
2020-01-23 13:00   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 22/80] arm/musicpal: " Igor Mammedov
2020-01-23 13:07   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 23/80] arm/nseries: " Igor Mammedov
2020-01-23 11:37   ` Igor Mammedov
2020-01-23 13:09   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 24/80] arm/omap_sx1: " Igor Mammedov
2020-01-23 13:12   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 25/80] arm/palm: " Igor Mammedov
2020-01-23 13:13   ` Andrew Jones
2020-01-23 13:13     ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 26/80] arm/raspi: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 27/80] arm/sabrelite: " Igor Mammedov
2020-01-23 13:15   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 28/80] arm/sbsa-ref: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 29/80] arm/versatilepb: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 30/80] arm/vexpress: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 31/80] arm/virt: " Igor Mammedov
2020-01-23 13:17   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 32/80] arm/xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 33/80] arm/xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-23 11:37   ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 34/80] arm/xlnx-versal-virt: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 35/80] arm/xlnx-zcu102: " Igor Mammedov
2020-01-23 11:38   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 36/80] s390x/s390-virtio-ccw: " Igor Mammedov
2020-01-23 18:05   ` Cornelia Huck
2020-01-23 11:38 ` [PATCH REPOST v3 37/80] null-machine: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 38/80] cris/axis_dev88: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 39/80] hw/hppa/machine: Correctly check the firmware is in PDC range Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 40/80] hw/hppa/machine: Restrict the total memory size to 3GB Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 41/80] hw/hppa/machine: Map the PDC memory region with higher priority Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 42/80] hppa: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 43/80] x86/microvm: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 44/80] x86/pc: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 45/80] lm32/lm32_boards: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 46/80] lm32/milkymist: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 47/80] m68k/an5206: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 48/80] m68k/mcf5208: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 49/80] m68k/next-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 50/80] mips/boston-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 51/80] mips/mips_fulong2e: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 52/80] mips/mips_fulong2e: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 53/80] mips/mips_jazz: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 54/80] mips/mips_malta: " Igor Mammedov
2020-01-24 17:16   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 55/80] mips/mips_mipssim: " Igor Mammedov
2020-01-24 17:17   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 56/80] mips/mips_r4k: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 57/80] ppc/e500: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 58/80] ppc/e500: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 59/80] ppc/mac_newworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 60/80] ppc/mac_oldworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 61/80] ppc/pnv: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 62/80] ppc/ppc405_boards: add RAM size checks Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 63/80] ppc/ppc405_boards: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup Igor Mammedov
2020-01-23 16:22   ` BALATON Zoltan
2020-01-27  3:39   ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo,sam460ex}: " David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 65/80] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM Igor Mammedov
2020-01-23 16:23   ` BALATON Zoltan
2020-01-27  3:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 66/80] ppc/prep: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 67/80] ppc/spapr: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 68/80] ppc/virtex_ml507: remove unused arguments Igor Mammedov
2020-01-24  9:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 69/80] ppc/virtex_ml507: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 70/80] sparc/leon3: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 71/80] sparc/sun4m: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 72/80] sparc/niagara: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 73/80] remove no longer used memory_region_allocate_system_memory() Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() Igor Mammedov
2020-01-24 10:25   ` Igor Mammedov
2020-01-27  3:31     ` David Gibson
2020-01-27  8:06   ` [PATCH v3.1 " Igor Mammedov
2020-01-27  8:18     ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() Igor Mammedov
2020-01-24  9:35   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 76/80] make mem_path local variable Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property Igor Mammedov
2020-01-24  9:50   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 78/80] hostmem: fix strict bind policy Igor Mammedov
2020-01-24 19:17   ` Halil Pasic
2020-01-27  7:39     ` Igor Mammedov
2020-01-27 14:41       ` Halil Pasic
2020-01-28 12:07         ` Igor Mammedov [this message]
2020-01-28 12:37           ` Halil Pasic
2020-01-23 11:38 ` [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups Igor Mammedov
2020-01-23 16:25   ` BALATON Zoltan
2020-01-23 16:33   ` Thomas Huth
2020-01-23 11:38 ` [PATCH REPOST v3 80/80] tests:numa-test: use explicit memdev to specify node RAM Igor Mammedov
2020-01-23 16:52   ` Thomas Huth
2020-01-23 13:04 ` [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend no-reply
2020-01-23 14:45 ` Laurent Vivier
2020-01-23 16:14   ` [PATCH v4 81/80] m68k/q800: use memdev for RAM Igor Mammedov
2020-01-23 19:31     ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200128130740.2f075e04@redhat.com \
    --to=imammedo@redhat.com \
    --cc=armbru@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=gongsu@us.ibm.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.