lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/17] sched/fair: Implement an EEVDF like policy
On Tue, Mar 28, 2023 at 06:26:51PM -0700, Josh Don wrote:

> > @@ -5088,19 +5307,20 @@ dequeue_entity(struct cfs_rq *cfs_rq, st
> > static void
> > check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
> > {
> > - unsigned long ideal_runtime, delta_exec;
> > + unsigned long delta_exec;
> > struct sched_entity *se;
> > s64 delta;
> >
> > - /*
> > - * When many tasks blow up the sched_period; it is possible that
> > - * sched_slice() reports unusually large results (when many tasks are
> > - * very light for example). Therefore impose a maximum.
> > - */
> > - ideal_runtime = min_t(u64, sched_slice(cfs_rq, curr), sysctl_sched_latency);
> > + if (sched_feat(EEVDF)) {
> > + if (pick_eevdf(cfs_rq) != curr)
> > + goto preempt;
>
> This could shortcircuit the loop in pick_eevdf once we find a best
> that has less vruntime and sooner deadline than curr, since we know
> we'll never pick curr in that case. Might help performance when we
> have a large tree for this cfs_rq.

Yeah, one of the things I did consider was having this set cfs_rq->next
such that the reschedule pick doesn't have to do the pick again. But I
figured keep things simple for now.

\
 
 \ /
  Last update: 2023-03-29 10:14    [W:0.240 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site