Martin Sivák has posted comments on this change.

Change subject: Cache the result of numaUtils.getVcpuPids
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/38564/3/vdsm/numaUtils.py
File vdsm/numaUtils.py:

Line 34:     return "/var/run/libvirt/qemu/%s.xml" % vmName
Line 35: 
Line 36: 
Line 37: def invalidateNumaCache(vm):
Line 38:     vmName = vm['vmName'].encode('utf-8')
> either vm.conf['vmName'] or vm.name
Done
Line 39:     path = _libvirt_xml_path(vmName)
Line 40:     try:
Line 41:         del _libvirt_vcpu_pids_cache[path]
Line 42:     except KeyError:


Line 47:     path = _libvirt_xml_path(vmName)
Line 48:     mtime = os.path.getmtime(path)
Line 49: 
Line 50:     if path in _libvirt_vcpu_pids_cache:
Line 51:         lastmtime, value = _libvirt_vcpu_pids_cache[path]
> we are, but onQemuDeath can be fired anytime.
Done
Line 52:         if lastmtime == mtime:
Line 53:             return value
Line 54: 
Line 55:     runInfo = ET.parse(path)


-- 
To view, visit https://gerrit.ovirt.org/38564
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I135143bccdd29697ec673819212193c0fc217e56
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to