'Set overall CPU fraction for this host
f: CPU bandwidth limit (positive fraction, or -1 for cfs unlimited)
sched: \'rt\' or \'cfs\'
Note \'cfs\' requires CONFIG_CFS_BANDWIDTH,
and \'rt\' requires CONFIG_RT_GROUP_SCHED'

def setCPUFrac(self, f, sched=None):

    if (not sched):
        sched = self.sched
    if (sched == 'rt'):
        if ((not f) or (f < 0)):
            raise Exception('Please    set    a    positive    CPU    fraction    for    sched=rt\n')
        (pstr, qstr, period, quota) = self.rtInfo(f)
    elif (sched == 'cfs'):
        (pstr, qstr, period, quota) = self.cfsInfo(f)
    else:
        return
    setPeriod = self.cgroupSet(pstr, period)
    setQuota = self.cgroupSet(qstr, quota)
    if (sched == 'rt'):
        sched = self.chrt()
    info(('(%s    %d/%dus)    ' % (sched, setQuota, setPeriod)))
