[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230227112102.028b2f81@gandalf.local.home>
Date: Mon, 27 Feb 2023 11:21:02 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Xuewen Yan <xuewen.yan@...soc.com>, vincent.guittot@...aro.org,
mingo@...hat.com, juri.lelli@...hat.com, dietmar.eggemann@....com,
bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
vschneid@...hat.com, qyousef@...alina.io,
linux-kernel@...r.kernel.org, ke.wang@...soc.com,
zhaoyang.huang@...soc.com
Subject: Re: [RFC PATCH] sched/fair: update the vruntime to be max vruntime
when yield
On Mon, 27 Feb 2023 16:40:33 +0100
Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, Feb 22, 2023 at 04:03:14PM +0800, Xuewen Yan wrote:
> > When task call the sched_yield, cfs would set the cfs's skip buddy.
> > If there is no other task call the sched_yield syscall, the task would
> > always be skiped when there are tasks in rq.
>
> So you have two tasks A) which does sched_yield() and becomes ->skip,
> and B) which is while(1). And you're saying that once A does it's thing,
> B runs forever and starves A?
If Xuewen has an example program that demonstrates the issue (pinning to a
CPU the two tasks), that could be very useful.
> This is a bad solution, SCHED_IDLE tasks have very low weight and can be
> shot really far to the right, leading to other trouble.
Does SCHED_IDLE tasks have to run on a busy CPU? That is, if you have a
SCHED_OTHER task running in a while loop, a SCHED_IDLE task will still get
runtime on that CPU? I always thought SCHED_IDLE tasks were just background
tasks for running when there was nothing else to run?
-- Steve
Powered by blists - more mailing lists