[libvirt] [PATCHv4 3/3] qemu: Add args generation for file memory backing

Safka, JaroslavX jaroslavx.safka at intel.com
Mon Jan 30 12:00:54 UTC 2017



> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange at redhat.com]
> Sent: Monday, January 30, 2017 12:38 PM
> To: Michal Privoznik <mprivozn at redhat.com>
> Cc: Safka, JaroslavX <jaroslavx.safka at intel.com>; libvir-list at redhat.com;
> Mooney, Sean K <sean.k.mooney at intel.com>; Ptacek, MichalX
> <michalx.ptacek at intel.com>
> Subject: Re: [libvirt] [PATCHv4 3/3] qemu: Add args generation for file memory
> backing
> 
> On Sat, Jan 28, 2017 at 03:03:16PM +0100, Michal Privoznik wrote:
> > On 13.12.2016 13:12, Jaroslav Safka wrote:
> > > This patch add support for file memory backing on numa topology.
> > >
> > > The specified access mode in memoryBacking can be overriden by
> > > specifying token memAccess in numa cell.
> > > ---
> > >  src/qemu/qemu_command.c                            | 113 ++++++++++++++-------
> > >  .../qemuxml2argv-fd-memory-no-numa-topology.args   |  21 ++++
> > >  .../qemuxml2argv-fd-memory-no-numa-topology.xml    |  27 +++++
> > >  .../qemuxml2argv-fd-memory-numa-topology.args      |  24 +++++
> > >  .../qemuxml2argv-fd-memory-numa-topology.xml       |  30 ++++++
> > >  .../qemuxml2argv-fd-memory-numa-topology2.args     |  26 +++++
> > >  .../qemuxml2argv-fd-memory-numa-topology2.xml      |  31 ++++++
> > >  .../qemuxml2argv-fd-memory-numa-topology3.args     |  30 ++++++
> > >  .../qemuxml2argv-fd-memory-numa-topology3.xml      |  32 ++++++
> > >  tests/qemuxml2argvtest.c                           |  12 ++-
> > >  tests/qemuxml2xmltest.c                            |   1 -
> > >  11 files changed, 308 insertions(+), 39 deletions(-)  create mode
> > > 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-
> topology.args
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-
> topology.xml
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.args
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.xml
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.args
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.xml
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.args
> > >  create mode 100644
> > > tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.xml
> >
> > A lot of tests. Impressive.
> >
> > >
> > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index
> > > 7d186d2..a897ed5 100644
> > > --- a/src/qemu/qemu_command.c
> > > +++ b/src/qemu/qemu_command.c
> > > @@ -3315,15 +3315,11 @@ qemuBuildMemoryBackendStr(unsigned long
> long size,
> > >      if (!(props = virJSONValueNewObject()))
> > >          return -1;
> > >
> > > -    if (pagesize) {
> > > -        if (qemuGetDomainHupageMemPath(def, cfg, pagesize, &mem_path)
> < 0)
> > > -            goto cleanup;
> > > -
> > > +    if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) {
> > >          *backendType = "memory-backend-file";
> > >
> > >          if (virJSONValueObjectAdd(props,
> > > -                                  "b:prealloc", true,
> > > -                                  "s:mem-path", mem_path,
> > > +                                  "s:mem-path", cfg->libDir,
> >
> > Really? cfg->libDir should stay intact. Should QEMU need to create a
> > file, something cfg->stateDir based is probably more suitable. Or even
> > some /tmp/ based path. Or am I misunderstanding something?
> 
> You don't want multi-GB files created in /tmp, nor cfg->stateDir which is also
> on tmpfs
> 
[Jarek] Hi Daniel, then should I keep the libDir? Or what will be better? 

> 
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.




More information about the libvir-list mailing list