Earlier  
Posted Nick Remark
#openstack-nova - 2019-09-06
10:38:32 sean-k-mooney oh that should be the union of hte cores used for the vcpus
10:38:39 sean-k-mooney and should be updated
10:38:42 artom It only matters when an instance without a NUMA topology lands on a host with vcpu_pin
10:38:46 stephenfin alex_xu: You around today? I'm planning to work through the VPMEM series again, but is there any chance you could look at https://review.opendev.org/#/c/671800 ?
10:38:53 sean-k-mooney artom: yes
10:39:03 artom sean-k-mooney, right, so is that... a real thing?
10:39:10 sean-k-mooney yes
10:39:10 artom We tell people to split them by aggregates
10:39:17 stephenfin artom: wait for it
10:39:23 artom They don't?
10:39:29 sean-k-mooney you shoudl set vcpu_pin_set on all host ideally
10:39:37 stephenfin (sean-k-mooney is about to tell you that vcpu_pin_set has nothing to do with pinning and should always be set)
10:39:39 sean-k-mooney and it will be need for the new stuff stephenfin is working on
10:39:53 sean-k-mooney stephenfin: :)
10:39:53 artom Haha
10:40:18 openstackgerrit Gorka Eguileor proposed openstack/nova master: Use os-brick locking for volume attach and detach https://review.opendev.org/614190
10:40:19 stephenfin but yeah, vcpu_pin_set != pinning (or NUMA, for that matter)
10:40:24 stephenfin we use it for this stuff
10:40:36 sean-k-mooney its the set of core that the hypvervior may use for vms
10:40:41 sean-k-mooney nothing more or less
10:40:41 stephenfin and also to decide how much VCPU inventory to report to placement
10:41:05 sean-k-mooney yep its used for the inventory in the RT which is used for plamcent
10:41:22 stephenfin I don't agree with it being set by default, but yeah, it being set even when you don't have NUMA or pinning is a thing
10:41:25 artom OK, so it needs to be handled
10:41:30 stephenfin afraid so
10:41:38 sean-k-mooney stephenfin: you realise that for you vcpu work
10:41:51 sean-k-mooney we shoudl also be handelign shared and dedicated sets
10:42:03 artom sean-k-mooney, I'll most likely as you to test that bit when it's implemented
10:42:17 stephenfin sean-k-mooney: what do you mean?
10:42:18 artom Or if we can set it in the gate and show that working...
10:42:57 sean-k-mooney stephenfin: well for non pinned instance the cpuset will need to be updated based on the dest cpu_shared_set
10:43:24 sean-k-mooney and for pinned instnce it need to be updated based on the dedicated set
10:43:40 sean-k-mooney although the second half will be done by artoms exisitng code
10:44:07 stephenfin sean-k-mooney: Yeah, correct. That code has been updated here https://review.opendev.org/#/c/671800/28/nova/virt/libvirt/driver.py
10:44:42 openstackgerrit Luyao Zhong proposed openstack/nova master: object: Introduce Resource and ResourceList objs https://review.opendev.org/678448
10:44:43 openstackgerrit Luyao Zhong proposed openstack/nova master: Retrieve the allocations early https://review.opendev.org/678450
10:44:43 openstackgerrit Luyao Zhong proposed openstack/nova master: Add resources dict into _Provider https://review.opendev.org/678449
10:44:44 openstackgerrit Luyao Zhong proposed openstack/nova master: Claim resources in resource tracker https://review.opendev.org/678452
10:44:45 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: report VPMEM resources by provider tree https://review.opendev.org/678454
10:44:45 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: Enable driver discovering PMEM namespaces https://review.opendev.org/678453
10:44:46 openstackgerrit Luyao Zhong proposed openstack/nova master: Parse vpmem related flavor extra spec https://review.opendev.org/678456
10:44:46 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: Support VM creation with vpmems and vpmems cleanup https://review.opendev.org/678455
10:44:47 openstackgerrit Luyao Zhong proposed openstack/nova master: Add functional tests for virtual persistent memory https://review.opendev.org/678470
10:44:47 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: Enable driver configuring PMEM namespaces https://review.opendev.org/679640
10:44:48 openstackgerrit Luyao Zhong proposed openstack/nova master: doc: attaching virtual persistent memory to guests https://review.opendev.org/680300
10:46:22 sean-k-mooney by the way people know that cpuset in the vcpu element is funtionally the same as generatin vcpuin elemnt for each core pinning the core to the set of host core set in vcpu pin set
10:46:31 artom stephenfin, sean-k-mooney, actually, while we're on the topic, I thought you could get CPU pinning with https://libvirt.org/formatdomain.html#elementsCPUTuning without NUMA pinning with https://libvirt.org/formatdomain.html#elementsNUMATuning
10:46:47 artom For example by using only the cpu_policy=dedicated extra spec
10:46:49 sean-k-mooney artom: yes you can
10:46:57 sean-k-mooney no
10:47:05 sean-k-mooney if you use cpu_policy=dedicated
10:47:11 sean-k-mooney you will have a numa toplogy
10:47:20 sean-k-mooney if you set vcpu_pin_set on the host
10:47:22 artom But looking at the code of _get_guets_numa_config, IIUC if it sets vcpupin, it'll also set the memnode stuff
10:47:26 sean-k-mooney and set nothing on the flavor
10:47:42 sean-k-mooney you get <vcpu placement='static' cpuset="1-4,^3,6" current="1">2</vcpu>
10:47:45 artom sean-k-mooney, right, that's the case with <vcpu cpuset=blah> that I'm not handling
10:47:55 sean-k-mooney or whatever the vcpu_pin_set is but no numa affinity
10:48:05 artom I was talking about <cputune> without <numatune>
10:48:17 artom Is that possible? Don't think so
10:48:19 sean-k-mooney oh libvirt allows that but we never generate it
10:48:23 artom Aha, ok
10:48:53 artom Confirms what I was seeing in the code, thanks
10:49:03 sean-k-mooney we only generate the cputune element if you have pinning nebaled which give you a numa toplogy
10:49:16 sean-k-mooney we do generate numatune without cpu tune i think
10:49:26 sean-k-mooney e.g. if you just enable hugepages but no pinning
10:49:32 sean-k-mooney or hw:numa_nodes=X
10:50:23 artom sean-k-mooney, you sure? It would happen only if https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4609 doesn't iterate at all
10:50:52 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: report VPMEM resources by provider tree https://review.opendev.org/678454
10:50:52 sean-k-mooney we definitly numa affine hugepages
10:50:53 openstackgerrit Luyao Zhong proposed openstack/nova master: Parse vpmem related flavor extra spec https://review.opendev.org/678456
10:50:53 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: Support VM creation with vpmems and vpmems cleanup https://review.opendev.org/678455
10:50:54 openstackgerrit Luyao Zhong proposed openstack/nova master: Add functional tests for virtual persistent memory https://review.opendev.org/678470
10:50:54 openstackgerrit Luyao Zhong proposed openstack/nova master: libvirt: Enable driver configuring PMEM namespaces https://review.opendev.org/679640
10:50:55 openstackgerrit Luyao Zhong proposed openstack/nova master: doc: attaching virtual persistent memory to guests https://review.opendev.org/680300
10:51:10 sean-k-mooney im just not sure if we use vcpupin to pin the cores to the numa node or cpuset
10:51:12 artom sean-k-mooney, right, I'm saying in those cases we also affine guest CPUs with cputune
10:51:19 sean-k-mooney ah ok
10:51:34 sean-k-mooney well as i said cpuset is just a shortcurt for vcpupin
10:51:43 sean-k-mooney let me give an example
10:52:28 sean-k-mooney those are the same
10:52:31 sean-k-mooney <vcpu placement='static' cpuset="1-4" current="1">2</vcpu>
10:52:33 sean-k-mooney <cputune>
10:52:35 sean-k-mooney <vcpupin vcpu="0" cpuset="1-4"/>
10:52:37 sean-k-mooney <vcpupin vcpu="1" cpuset="1,2,3,4"/>
10:52:39 sean-k-mooney <cputune>
10:52:54 sean-k-mooney libvirt internally generate the vcpupin element form the cpu set
10:53:04 sean-k-mooney and generge the same qemu commandline
10:53:12 artom Wait a second.
10:53:24 artom My *entire* code triggers if the instance has a NUMA topology
10:53:32 sean-k-mooney yes
10:53:53 artom So the insance with no NUMA topology on a host with vcpu_pin_set case will have to...?
10:54:12 sean-k-mooney you will need to add support for it
10:54:22 sean-k-mooney well you or stepen
10:54:30 sean-k-mooney technically this is a long standing issue
10:54:43 sean-k-mooney we always should have been updating the xml
10:54:54 sean-k-mooney it will be fixed via a hard reboot however
10:55:15 sean-k-mooney libvirt will reject the migration if the cores do not exist on the dest
10:55:25 artom Right, true
10:55:33 artom I'm surprised more people haven't been hitting that

Earlier   Later