On 10/12/2015 09:45 AM, Juri Lelli wrote:
If the deadline contribution to rq->rt_avg is left in place, can RT and deadline both be accounted for via that one mechanism for the purposes of sched-dvfs?
I'd keep them separate, as the DEADLINE part is much more accurate than RT (and CFS). IMHO, using rt_avg for driving sched-dvfs is still trying to make up for the fact that RT lacks a more accurate PELT; so we need to try to use this other running avg thing, at least in the short run.
I'm not sure how the accuracy/behavior of the deadline accounting to rq->rt_avg differs from the forthcoming patchset Juri mentioned, but if it's not as good, perhaps the mechanisms could be combined so that rt_avg (and by extension the per-CPU capacity adjustments in CFS) benefit as well.
The fact with DEADLINE is that it actually doesn't track anything, it just enforce a max utilization, and this is what can be used to ask for a minimum capacity. So, I fear there is little space for combining the two things, but splitting them, as Vincent is proposing, seems to make sense to me.
Agreed, I didn't read Vincent's comment closely enough and also wasn't thinking about how rt_avg is maintained, which prevents the more accurate DEADLINE requirement from simply being added in. My concern was just that the improved DEADLINE predictions be used not only for sched-dvfs but also for scaling the capacity in CFS but Vincent's proposal will take care of that.
One minor suggestion, perhaps scale_rt_capacity could be renamed more accurately as scale_rt_dl_capacity as part of the series.