Change in vdsm[master]: HostStatsThread: change way of counting CPUs

bpradip at in.ibm.com bpradip at in.ibm.com
Wed Mar 13 07:52:47 UTC 2013


Pradipta Banerjee has posted comments on this change.

Change subject: HostStatsThread: change way of counting CPUs
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm/utils.py
Line 576:         self._pid = os.getpid()
Line 577:         cpuPattern = re.compile('cpu[0-9]+')
Line 578:         self._ncpus = len(filter(cpuPattern.match,
Line 579:                                  os.listdir('/sys/devices/system/cpu')))
Line 580: 
How about using python's multiprocessing.cpu_count() to get the number of cpus in platform neutral way?
Line 581:     def stop(self):
Line 582:         self._imagesStatus.stop()
Line 583:         StatsThread.stop(self)
Line 584: 


--
To view, visit http://gerrit.ovirt.org/12815
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9e1a104c2241b8f5e8a9b4098530826c3b1677d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Pradipta Banerjee <bpradip at in.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list