Messages in this thread | | | Date | Sat, 10 Jun 2023 13:22:41 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 11/15] sched/eevdf: Better handle mixed slice length |
| |
On Sat, Jun 10, 2023 at 02:34:04PM +0800, Chen Yu wrote:
> > +static inline bool > > +entity_has_slept(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > > +{ > > + u64 now; > > + > > + if (!(flags & ENQUEUE_WAKEUP)) > > + return false; > > + > > + if (flags & ENQUEUE_MIGRATED) > > + return true; > > + > > + now = rq_clock_task(rq_of(cfs_rq)); > > + return (s64)(se->exec_start - now) >= se->slice; > > +} > A minor question, should it be now - se->exec_start ? > (se->exec_start - now) is always negetive on local wakeup?
Yeah, also:
https://lkml.kernel.org/r/20230608124440.GB1002251@hirez.programming.kicks-ass.net
That is, it should be something along the lines of:
delta = new - se->exec->start rerturn delta/W > vslice
| |