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

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

 



On Mon, Jan 30, 2017 at 11:38:08AM +0000, Daniel P. Berrange wrote:
> 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

We should probably add a new option into qemu.conf which will configure
the path where those files will be stored.  It's not user friendly if you
cannot change the default path.

Pavel

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux