Revert "Revert "sched,fair: Alternative sched_slice()""
This reverts commit 3d24408745.
Bring back the commit in 5.10.36 that broke the kabi.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iafa9c51e4cb9e42f4149c4e9889b822288a96ad2
This commit is contained in:
parent
63524ab60a
commit
4cef9277ba
2 changed files with 14 additions and 1 deletions
|
|
@ -706,7 +706,13 @@ static u64 __sched_period(unsigned long nr_running)
|
|||
*/
|
||||
static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
|
||||
{
|
||||
u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
|
||||
unsigned int nr_running = cfs_rq->nr_running;
|
||||
u64 slice;
|
||||
|
||||
if (sched_feat(ALT_PERIOD))
|
||||
nr_running = rq_of(cfs_rq)->cfs.h_nr_running;
|
||||
|
||||
slice = __sched_period(nr_running + !se->on_rq);
|
||||
|
||||
for_each_sched_entity(se) {
|
||||
struct load_weight *load;
|
||||
|
|
@ -723,6 +729,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
|
|||
}
|
||||
slice = __calc_delta(slice, se->load.weight, load);
|
||||
}
|
||||
|
||||
if (sched_feat(BASE_SLICE))
|
||||
slice = max(slice, (u64)sysctl_sched_min_granularity);
|
||||
|
||||
return slice;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,3 +90,6 @@ SCHED_FEAT(WA_BIAS, true)
|
|||
*/
|
||||
SCHED_FEAT(UTIL_EST, true)
|
||||
SCHED_FEAT(UTIL_EST_FASTUP, true)
|
||||
|
||||
SCHED_FEAT(ALT_PERIOD, true)
|
||||
SCHED_FEAT(BASE_SLICE, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue