Change in vdsm[master]: scale: limit cpu usage using cpu-affinity

nsoffer at redhat.com nsoffer at redhat.com
Mon Sep 7 20:15:58 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: scale: limit cpu usage using cpu-affinity
......................................................................


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/45738/6/lib/vdsm/cmdutils.py
File lib/vdsm/cmdutils.py:

Line 69: 
Line 70: def taskset(cmd, cpu_list, all_tasks=True):
Line 71:     command = [constants.EXT_TASKSET,
Line 72:                '--all-tasks' if all_tasks else '',
Line 73:                '--cpu-list', ','.join(cpu_list)]
> OK, I kinda like the Python's ternary operator, but I see your point and wi
You are using it to set argv[1] of the taskset program to empty string, and this is not our intent, and it also does not work:

    $ taskset "" -c 1 sleep 60
    taskset: failed to set pid 0's affinity: Invalid argument

But there is a simple solution - we do not need --all-tasks in this context, since we are setting cpu affinity before a new program is executed. --all-tasks is needed only in taskset module.
Line 74:     command.extend(cmd)
Line 75:     return command
Line 76: 
Line 77: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f7f68d65eddb5a21afbc3809ea79cd1dee67984
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke 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 Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list