Change in vdsm[master]: numa: move cpu topology (numa) related functionality to sitelib
fromani at redhat.com
fromani at redhat.com
Thu Feb 11 13:30:39 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: numa: move cpu topology (numa) related functionality to sitelib
......................................................................
Patch Set 4: Code-Review-1
(5 comments)
nice work, few comments inside. I have to use -1 for visibility only (too many comments this time) but acutally this is almost ready
https://gerrit.ovirt.org/#/c/53287/4//COMMIT_MSG
Commit Message:
Line 9: The functionality can be nicely isolated and moved to sitelib, where
: additional cleanup and optimization work can take place. This is part
: of bigger series that attempts to move all numa related code to
: sitelib where it makes sense.
looks identical to parent's commit message. Intentional? Am I missing something?
https://gerrit.ovirt.org/#/c/53287/4/lib/vdsm/numa.py
File lib/vdsm/numa.py:
Line 95: onlineCpus
let's use pep8 names
Line 100: onlineCpus.append(cpu.get('id'))
Line 101: sockets.add(cpu.get('socket_id'))
Line 102: siblings.add(cpu.get('siblings'))
Line 103:
Line 104: topology = {'sockets': len(sockets),
nice, but I believe
topology = {
'sockets': len(sockets),
'cores': len(siblings),
'threads': len(onlineCpus),
'onlineCpus': onlineCpus,
}
is a bit better. Rationale: adding/remove pairs to this dict is now always a two line patch (one addition, one deletion).
Line 105: 'cores': len(siblings),
Line 106: 'threads': len(onlineCpus),
Line 107: 'onlineCpus': onlineCpus}
Line 108:
Line 109: topology
does it make sense to transform this into a namedtuple (perhaps into another patch)?
https://gerrit.ovirt.org/#/c/53287/4/vdsm/caps.py
File vdsm/caps.py:
Line 425: numa.cpu_topology()
nit/personal taste: I'd invoke it once and dispatch the fields from the returned value. But not really that important, your call.
--
To view, visit https://gerrit.ovirt.org/53287
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie786e8a3626dd257c2a244decfe3e6a127d04b28
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list