[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHb_TOmEE8Wu-Be3iPbL-FMkDeQf-2o_2B2Xt4tAwPyc7vNtmA@mail.gmail.com>
Date: Fri, 24 Dec 2021 09:58:21 +0800
From: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, Benjamin Segall <bsegall@...gle.com>,
mgorman@...e.de, bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] schedule: SCHED_RR: Give a fresh time-slice to the task
after after it suspends or relinquishes
Peter Zijlstra <peterz@...radead.org> 于2021年12月22日周三 18:41写道:
>
> On Wed, Dec 22, 2021 at 05:15:26PM +0800, zhaoxiu.zeng wrote:
> > Assuming the sched_rr_timeslice is 100ms, there are several tasks with the
> > same priority t1, t2, t3, ..., and t1 sleeps every 80ms, the scheduling
> > timing may be:
> > t1 t2 t3 t1 t2 t3 t1 t2 t3 t1 t2 t3
> > 80, 100, 100, ..., 20, 100, 100, ..., 60, 100, 100, ..., 40, 100, 100
> >
> > After applying this patch, the scheduling timing may be:
> > t1 t2 t3 t1 t2 t3 t1 t2 t3 t1 t2 t3
> > 80, 100, 100, ..., 80, 100, 100, ..., 80, 100, 100, ..., 80, 100, 100
> >
>
> Is this what POSIX mandates or why are you sending this to me ?
Thanks for your reply!
I don't see a definition of this in POSIX.
Give a fresh time-slice may decreases context switches, and be more
fairly to the tasks which suspended then resumed.
Powered by blists - more mailing lists