Francesco Romani has uploaded a new change for review. Change subject: daemon: ignore cpu affinity on single processor ......................................................................
daemon: ignore cpu affinity on single processor If VDSM runs on single processor hosts (E.g. VMs) there is no point in enabling cpu affinity, since we already reached the goal of running on just one CPU. Change-Id: I0652189704cbce71d20ec809c9c26f081516758a Bug-Url: https://bugzilla.redhat.com/1279431 Backport-To: 3.6 Signed-off-by: Francesco Romani <from...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/48619 Continuous-Integration: Jenkins CI Reviewed-by: Nir Soffer <nsof...@redhat.com> --- M vdsm/vdsm 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/48961/1 diff --git a/vdsm/vdsm b/vdsm/vdsm index 867e900..c9b6219 100755 --- a/vdsm/vdsm +++ b/vdsm/vdsm @@ -271,6 +271,11 @@ log = logging.getLogger('vds') log.info('VDSM will run with cpu affinity: %s', cpu_set) + # too early to use the facilities from caps.py + if os.sysconf('SC_NPROCESSORS_ONLN') == 1: + log.warning('Only one cpu detected: affinity disabled') + return + taskset.set(os.getpid(), cpu_set, all_tasks=True) -- To view, visit https://gerrit.ovirt.org/48961 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0652189704cbce71d20ec809c9c26f081516758a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches