Change in vdsm[master]: Replace calling setSchedulerParameters() with filling its XM...

Ryan Harper ryanh at us.ibm.com
Fri Sep 21 16:59:02 UTC 2012


Ryan Harper has posted comments on this change.

Change subject: Replace calling setSchedulerParameters() with filling its XML description.
......................................................................


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

(2 inline comments)

....................................................
File vdsm/libvirtvm.py
Line 501
Line 502
Line 503
Line 504
Line 505
`man 2 getpriority' says min niceness (most favored for scheduling) is -20.


Line 504:     MAX_NICENESS = 19
Line 505:     MIN_NICENESS = -19
Line 506:     DEFAULT_VM_PRIO = 20
Line 507:     DEFAULT_CGROUP_CPUSHARE = 1024
Line 508:     CPUSHARE_SCALE_FACTOR = DEFAULT_CGROUP_CPUSHARE / DEFAULT_VM_PRIO
integer math loses some share value:


>>> 1024 / 20
51
>>> 1024.0 / 20.0 
51.2

This results in the default nice=0 getting 1020 cpu share value, rather than 1024.

Without fixing the min niceness, if nice=-19, then we get a cpu share of 1989, rather than 2048.

nice=19 results in a share value of 51/51.2 ... though it's not clear to me what cpu share of 0 would mean.

I don't know that these issues would have any meaningful effect on scheduler.
Line 509: 
Line 510:     def __init__(self, conf, log):
Line 511:         """
Line 512:         Create the skeleton of a libvirt domain xml


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I211e191022f5a18fa7d97d5a8fb42e10729ddd06
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>


More information about the vdsm-patches mailing list