Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-15 Thread Martin Kletzander

On Wed, Sep 10, 2014 at 04:46:27PM +0100, Daniel P. Berrange wrote:

On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:

On 09/08/2014 01:40 PM, Martin Kletzander wrote:
 Signed-off-by: Martin Kletzander mklet...@redhat.com
 ---
  docs/formatdomain.html.in  |  7 +++-
  docs/schemas/domaincommon.rng  |  5 +++
  src/conf/cpu_conf.c| 25 +++-
  src/conf/cpu_conf.h|  7 ++--
  .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
  .../qemuxml2argv-hugepages-shared.xml  | 45 
++
  tests/qemuxml2xmltest.c|  2 +
  7 files changed, 113 insertions(+), 6 deletions(-)
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml

 diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
 index 94236dd..b284d6e 100644
 --- a/docs/formatdomain.html.in
 +++ b/docs/formatdomain.html.in
 @@ -1105,7 +1105,7 @@
  ...
  lt;numagt;
lt;cell id='0' cpus='0-3' memory='512000'/gt;
 -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
 +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;

I wonder if shared='on' would be enough, avoiding the need for a multi-word
attribute.


Or how about   access=shared|private   ?



I prepended the mem so that it is visible that it has something to
do with the memory, not the whole node.  But I'm OK with pushing
shared= as well.  Using access= seems too ambiguously worded to me,
although if most of you agree...

Martin


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-15 Thread Daniel P. Berrange
On Mon, Sep 15, 2014 at 09:47:45AM +0200, Martin Kletzander wrote:
 On Wed, Sep 10, 2014 at 04:46:27PM +0100, Daniel P. Berrange wrote:
 On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:
 On 09/08/2014 01:40 PM, Martin Kletzander wrote:
  Signed-off-by: Martin Kletzander mklet...@redhat.com
  ---
   docs/formatdomain.html.in  |  7 +++-
   docs/schemas/domaincommon.rng  |  5 +++
   src/conf/cpu_conf.c| 25 +++-
   src/conf/cpu_conf.h|  7 ++--
   .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
   .../qemuxml2argv-hugepages-shared.xml  | 45 
  ++
   tests/qemuxml2xmltest.c|  2 +
   7 files changed, 113 insertions(+), 6 deletions(-)
   create mode 100644 
  tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
   create mode 100644 
  tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
 
  diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
  index 94236dd..b284d6e 100644
  --- a/docs/formatdomain.html.in
  +++ b/docs/formatdomain.html.in
  @@ -1105,7 +1105,7 @@
   ...
   lt;numagt;
 lt;cell id='0' cpus='0-3' memory='512000'/gt;
  -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
  +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;
 
 I wonder if shared='on' would be enough, avoiding the need for a 
 multi-word
 attribute.
 
 Or how about   access=shared|private   ?
 
 
 I prepended the mem so that it is visible that it has something to
 do with the memory, not the whole node.  But I'm OK with pushing
 shared= as well.  Using access= seems too ambiguously worded to me,
 although if most of you agree...

Sure, memAccess is fine with me. 


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-15 Thread Martin Kletzander

On Mon, Sep 15, 2014 at 10:20:01AM +0100, Daniel P. Berrange wrote:

On Mon, Sep 15, 2014 at 09:47:45AM +0200, Martin Kletzander wrote:

On Wed, Sep 10, 2014 at 04:46:27PM +0100, Daniel P. Berrange wrote:
On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:
On 09/08/2014 01:40 PM, Martin Kletzander wrote:
 Signed-off-by: Martin Kletzander mklet...@redhat.com
 ---
  docs/formatdomain.html.in  |  7 +++-
  docs/schemas/domaincommon.rng  |  5 +++
  src/conf/cpu_conf.c| 25 +++-
  src/conf/cpu_conf.h|  7 ++--
  .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
  .../qemuxml2argv-hugepages-shared.xml  | 45 
++
  tests/qemuxml2xmltest.c|  2 +
  7 files changed, 113 insertions(+), 6 deletions(-)
  create mode 100644 
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml

 diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
 index 94236dd..b284d6e 100644
 --- a/docs/formatdomain.html.in
 +++ b/docs/formatdomain.html.in
 @@ -1105,7 +1105,7 @@
  ...
  lt;numagt;
lt;cell id='0' cpus='0-3' memory='512000'/gt;
 -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
 +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;

I wonder if shared='on' would be enough, avoiding the need for a multi-word
attribute.

Or how about   access=shared|private   ?


I prepended the mem so that it is visible that it has something to
do with the memory, not the whole node.  But I'm OK with pushing
shared= as well.  Using access= seems too ambiguously worded to me,
although if most of you agree...


Sure, memAccess is fine with me.



Is there any possibility of that option having another value (in the
future)?  Otherwise shared= seems more appropriate to me.  Let's see
what others think, so I can finally get rid of this problem :)

Martin


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-15 Thread Daniel P. Berrange
On Mon, Sep 15, 2014 at 01:19:25PM +0200, Martin Kletzander wrote:
 On Mon, Sep 15, 2014 at 10:20:01AM +0100, Daniel P. Berrange wrote:
 On Mon, Sep 15, 2014 at 09:47:45AM +0200, Martin Kletzander wrote:
 On Wed, Sep 10, 2014 at 04:46:27PM +0100, Daniel P. Berrange wrote:
 On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:
 On 09/08/2014 01:40 PM, Martin Kletzander wrote:
  Signed-off-by: Martin Kletzander mklet...@redhat.com
  ---
   docs/formatdomain.html.in  |  7 +++-
   docs/schemas/domaincommon.rng  |  5 +++
   src/conf/cpu_conf.c| 25 +++-
   src/conf/cpu_conf.h|  7 ++--
   .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
   .../qemuxml2argv-hugepages-shared.xml  | 45 
  ++
   tests/qemuxml2xmltest.c|  2 +
   7 files changed, 113 insertions(+), 6 deletions(-)
   create mode 100644 
  tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
   create mode 100644 
  tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
 
  diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
  index 94236dd..b284d6e 100644
  --- a/docs/formatdomain.html.in
  +++ b/docs/formatdomain.html.in
  @@ -1105,7 +1105,7 @@
   ...
   lt;numagt;
 lt;cell id='0' cpus='0-3' memory='512000'/gt;
  -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
  +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;
 
 I wonder if shared='on' would be enough, avoiding the need for a 
 multi-word
 attribute.
 
 Or how about   access=shared|private   ?
 
 
 I prepended the mem so that it is visible that it has something to
 do with the memory, not the whole node.  But I'm OK with pushing
 shared= as well.  Using access= seems too ambiguously worded to me,
 although if most of you agree...
 
 Sure, memAccess is fine with me.
 
 
 Is there any possibility of that option having another value (in the
 future)?  Otherwise shared= seems more appropriate to me.  Let's see
 what others think, so I can finally get rid of this problem :)

I prefer the approach of having values reflect the usage, as 'shared' vs
'private' for the value is clearer than  'on' vs 'off' IMHO.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-15 Thread Martin Kletzander

On Mon, Sep 15, 2014 at 12:40:48PM +0100, Daniel P. Berrange wrote:

On Mon, Sep 15, 2014 at 01:19:25PM +0200, Martin Kletzander wrote:

On Mon, Sep 15, 2014 at 10:20:01AM +0100, Daniel P. Berrange wrote:
On Mon, Sep 15, 2014 at 09:47:45AM +0200, Martin Kletzander wrote:
On Wed, Sep 10, 2014 at 04:46:27PM +0100, Daniel P. Berrange wrote:
On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:
On 09/08/2014 01:40 PM, Martin Kletzander wrote:
 Signed-off-by: Martin Kletzander mklet...@redhat.com
 ---
  docs/formatdomain.html.in  |  7 +++-
  docs/schemas/domaincommon.rng  |  5 +++
  src/conf/cpu_conf.c| 25 +++-
  src/conf/cpu_conf.h|  7 ++--
  .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
  .../qemuxml2argv-hugepages-shared.xml  | 45 
++
  tests/qemuxml2xmltest.c|  2 +
  7 files changed, 113 insertions(+), 6 deletions(-)
  create mode 100644 
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
  create mode 100644 
tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml

 diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
 index 94236dd..b284d6e 100644
 --- a/docs/formatdomain.html.in
 +++ b/docs/formatdomain.html.in
 @@ -1105,7 +1105,7 @@
  ...
  lt;numagt;
lt;cell id='0' cpus='0-3' memory='512000'/gt;
 -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
 +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;

I wonder if shared='on' would be enough, avoiding the need for a 
multi-word
attribute.

Or how about   access=shared|private   ?


I prepended the mem so that it is visible that it has something to
do with the memory, not the whole node.  But I'm OK with pushing
shared= as well.  Using access= seems too ambiguously worded to me,
although if most of you agree...

Sure, memAccess is fine with me.


Is there any possibility of that option having another value (in the
future)?  Otherwise shared= seems more appropriate to me.  Let's see
what others think, so I can finally get rid of this problem :)


I prefer the approach of having values reflect the usage, as 'shared' vs
'private' for the value is clearer than  'on' vs 'off' IMHO.



OK, it makes more sense when you put it like that.  I'll send a v2 to
make sure everyone agrees on all three patches.

Martin


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-10 Thread Ján Tomko
On 09/08/2014 01:40 PM, Martin Kletzander wrote:
 Signed-off-by: Martin Kletzander mklet...@redhat.com
 ---
  docs/formatdomain.html.in  |  7 +++-
  docs/schemas/domaincommon.rng  |  5 +++
  src/conf/cpu_conf.c| 25 +++-
  src/conf/cpu_conf.h|  7 ++--
  .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
  .../qemuxml2argv-hugepages-shared.xml  | 45 
 ++
  tests/qemuxml2xmltest.c|  2 +
  7 files changed, 113 insertions(+), 6 deletions(-)
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
 
 diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
 index 94236dd..b284d6e 100644
 --- a/docs/formatdomain.html.in
 +++ b/docs/formatdomain.html.in
 @@ -1105,7 +1105,7 @@
  ...
  lt;numagt;
lt;cell id='0' cpus='0-3' memory='512000'/gt;
 -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
 +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;

I wonder if shared='on' would be enough, avoiding the need for a multi-word
attribute.

  lt;/numagt;
  ...
lt;/cpugt;
 @@ -1122,6 +1122,11 @@
assigned codeid/codes in the increasing order starting from
0.  Mixing cells with and without the codeid/code attribute
is not recommended as it may result in unwanted behaviour.
 +
 +  span class='since'Since 1.2.9/span the optional attribute
 +  codememShared/code can control whether the memory is to be
 +  mapped as shared or not (values on/off).  This is valid only
 +  for hugepages-backed memory.
  /p
 
  p

 @@ -491,7 +491,7 @@ virCPUDefParseXML(xmlNodePtr node,
  goto error;
  }
 
 -ret  = virStrToLong_ui(memory, NULL, 10, 
 def-cells[cur_cell].mem);
 +ret = virStrToLong_ui(memory, NULL, 10, 
 def-cells[cur_cell].mem);
  if (ret == -1) {
  virReportError(VIR_ERR_XML_ERROR, %s,
 _(Invalid 'memory' attribute in NUMA cell));
 @@ -93,9 +93,10 @@ struct _virCPUFeatureDef {
  typedef struct _virCellDef virCellDef;
  typedef virCellDef *virCellDefPtr;
  struct _virCellDef {
 -   virBitmapPtr cpumask; /* CPUs that are part of this node */
 -   char *cpustr; /* CPUs stored in string form for dumpxml */
 -   unsigned int mem; /* Node memory in kB */
 +virBitmapPtr cpumask;/* CPUs that are part of this node */
 +char *cpustr;/* CPUs stored in string form for dumpxml */

The comments would look nicer aligned.

 +unsigned int mem;/* Node memory in kB */
 +virTristateSwitch memShared;
  };
 
  typedef struct _virCPUDef virCPUDef;

Please push these whitespace cleanups separately.

Jan



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] docs, conf, schema: add support for shared memory mapping

2014-09-10 Thread Daniel P. Berrange
On Wed, Sep 10, 2014 at 05:36:58PM +0200, Ján Tomko wrote:
 On 09/08/2014 01:40 PM, Martin Kletzander wrote:
  Signed-off-by: Martin Kletzander mklet...@redhat.com
  ---
   docs/formatdomain.html.in  |  7 +++-
   docs/schemas/domaincommon.rng  |  5 +++
   src/conf/cpu_conf.c| 25 +++-
   src/conf/cpu_conf.h|  7 ++--
   .../qemuxml2argv-cpu-numa-memshared.xml| 28 ++
   .../qemuxml2argv-hugepages-shared.xml  | 45 
  ++
   tests/qemuxml2xmltest.c|  2 +
   7 files changed, 113 insertions(+), 6 deletions(-)
   create mode 100644 
  tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
  
  diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
  index 94236dd..b284d6e 100644
  --- a/docs/formatdomain.html.in
  +++ b/docs/formatdomain.html.in
  @@ -1105,7 +1105,7 @@
   ...
   lt;numagt;
 lt;cell id='0' cpus='0-3' memory='512000'/gt;
  -  lt;cell id='1' cpus='4-7' memory='512000'/gt;
  +  lt;cell id='1' cpus='4-7' memory='512000' memShared='on'/gt;
 
 I wonder if shared='on' would be enough, avoiding the need for a multi-word
 attribute.

Or how about   access=shared|private   ?

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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