Change in vdsm[master]: vdsm: introduce cpuinfo module

nsoffer at redhat.com nsoffer at redhat.com
Sat Jan 9 18:11:14 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: vdsm: introduce cpuinfo module
......................................................................


Patch Set 20:

(2 comments)

https://gerrit.ovirt.org/#/c/46912/20/lib/vdsm/cpuinfo.py
File lib/vdsm/cpuinfo.py:

Line 56: 
Line 57:     return cpus
Line 58: 
Line 59: 
Line 60: def flags():
I think this is a good api, please keep it.
Line 61:     '''
Line 62:     Get the CPU flags.
Line 63: 
Line 64:     Returns:


Line 73: 
Line 74:     if cpuarch.is_x86(cpuarch.real()):
Line 75:         return cpus[0]['flags'].split()
Line 76:     elif cpuarch.is_ppc(cpuarch.real()):
Line 77:         return ['powernv']
This is much too complex then needed. We need to access the cached cpu info already holding the correct data from the current arch, and return the flags - should be one line of code.
Line 78: 
Line 79: 
Line 80: def mhz():
Line 81:     '''


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list