Re: [PATCH v1 5/7] domain: Introduce ./hugepages/page/[@size, @unit, @nodeset]

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

 



On 21.07.2014 17:09, Daniel P. Berrange wrote:
On Thu, Jul 17, 2014 at 06:12:46PM +0200, Michal Privoznik wrote:
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <memoryBacking>
+    <hugepages>
+      <page size='2048' unit='KiB' nodeset='1'/>
+      <page size='1048576' unit='KiB' nodeset='0,2-3'/>
+    </hugepages>
+  </memoryBacking>
+  <vcpu placement='static'>4</vcpu>
+  <numatune>
+    <memory mode='strict' nodeset='0-3'/>
+    <memnode cellid='3' mode='strict' nodeset='3'/>
+  </numatune>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu>
+    <numa>
+      <cell id='0' cpus='0' memory='1048576'/>
+      <cell id='1' cpus='1' memory='1048576'/>
+      <cell id='2' cpus='2' memory='1048576'/>
+      <cell id='3' cpus='3' memory='1048576'/>
+    </numa>
+  </cpu>

There's nothing functionally wrong with what you have here, but I'm
wondering if you considered just adding a page size attribute against
the <cell> element under <numa> here ? Feels like that might be a bit
less verbose for the XML

Huh funny. That idea came up to my mind, but I thought it was more verbose so I went down this road. I'm not fundamentally against it, but I like my approach more. In most common case, users will use only one size of huge pages to back their guests, so all they need to do is:

<memoryBacking>
  <hugepages>
    <page size='1' unit='G'/>
  </hugepages>
</memoryBacking>

instead of repeating @pagesize attribute in each <cell/>. But as far as I see it's just question of preference without any technical impact, right?

Michal

--
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]