Messages in this thread | | | Date | Wed, 03 Apr 2013 10:15:01 +0800 | From | Alex Shi <> | Subject | Re: [patch v6 10/21] sched: get rq potential maximum utilization |
| |
On 04/02/2013 05:02 PM, Namhyung Kim wrote: >> > + cfs_util = (FULL_UTIL - rt_util) > rq->util ? rq->util >> > + : (FULL_UTIL - rt_util); >> > + nr_running = rq->nr_running ? rq->nr_running : 1; > This can be cleaned up with proper min/max(). > >> > + >> > + return rt_util + cfs_util * nr_running; > Should this nr_running consider tasks in cfs_rq only?
use nr_running of cfs_rq seems better, but when use sched autogroup, only cfs->nr_running just the active group number, not the total active task number. :(
Also it seems > there's no upper bound so that it can possibly exceed FULL_UTIL.
-- Thanks Alex
| |