Change in vdsm[master]: ipwrapper: fix excessive process creation
danken at redhat.com
danken at redhat.com
Sat Dec 21 09:54:05 UTC 2013
Dan Kenigsberg has posted comments on this change.
Change subject: ipwrapper: fix excessive process creation
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
....................................................
Commit Message
Line 9: _detectType is a very very often used operation and it was relying
Line 10: executing the ethtool binary for its operation. That was so costly
Line 11: that we were forced to use memoization to minimize the impact.
Line 12: Unfortunately, that came with its own risks, as the memoization
Line 13: was name based and could eventually give wrong names or even more
Do we ever rely on detectType to detect existence? Or is it a theoretical issue?
Please explain why this cannot be done by calling python-ethetool. I suppose that TODO and an ethtool bz# would do.
Since we're to support ppc64, the plot further thickens. Pls double check endianness issues.
Line 14: common, fail to detect that a device is no longer present in the
Line 15: system.
Line 16:
Line 17: Change-Id: I8de502669dfa00585d8d775f51be5617cd4f63d0
....................................................
File lib/vdsm/ipwrapper.py
Line 38:
Line 39: _IP_BINARY = CommandPath('ip', '/sbin/ip')
Line 40:
Line 41: NET_SYSFS = '/sys/class/net'
Line 42: ETHTOOL_GDRVINFO = 0x00000003 # ETHTOOL Get driver info command
Let's not expose these.
Line 43: SIOCETHTOOL = 0x8946 # Ethtool interface
Line 44:
Line 45:
Line 46: def _isValid(ip, verifier):
Line 236: return True
Line 237: return False
Line 238:
Line 239:
Line 240: def _drvinfo(devName):
Imo, this deserves a test, creating a bridge and detecting its type.
Line 241: """Returns the driver used by a device.
Line 242: Throws IOError ENODEV for non existing devices.
Line 243: Throws IOError EOPNOTSUPP for non supported devices, i.g., loopback."""
Line 244: BUFFER_SIZE = 2048
--
To view, visit http://gerrit.ovirt.org/22609
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8de502669dfa00585d8d775f51be5617cd4f63d0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list