mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Xuewen Yan <xuewen.yan@unisoc.com>,
	vincent.guittot@linaro.org, mingo@redhat.com,
	juri.lelli@redhat.com, dietmar.eggemann@arm.com,
	bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
	vschneid@redhat.com, qyousef@layalina.io,
	linux-kernel@vger.kernel.org, ke.wang@unisoc.com,
	zhaoyang.huang@unisoc.com
Subject: Re: [RFC PATCH] sched/fair: update the vruntime to be max vruntime when yield
Date: Mon, 27 Feb 2023 11:21:02 -0500	[thread overview]
Message-ID: <20230227112102.028b2f81@gandalf.local.home> (raw)
In-Reply-To: <Y/zO8WZV2kvcU78b@hirez.programming.kicks-ass.net>

On Mon, 27 Feb 2023 16:40:33 +0100
Peter Zijlstra <peterz@infradead.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


  reply	other threads:[~2023-02-27 16:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  8:03 Xuewen Yan
2023-02-27  1:51 ` Xuewen Yan
2023-02-27 15:40 ` Peter Zijlstra
2023-02-27 16:21   ` Steven Rostedt [this message]
2023-02-27 22:07   ` Qais Yousef
2023-02-28  7:42     ` Xuewen Yan
2023-02-28  7:53       ` Vincent Guittot
2023-02-28  8:20         ` Xuewen Yan
2023-02-28  9:07           ` Vincent Guittot
2023-02-28 13:31             ` Qais Yousef
2023-02-28 13:45               ` Vincent Guittot
2023-03-01  7:30                 ` Xuewen Yan
2023-03-01  8:09                   ` Vincent Guittot
2023-03-01  8:20                     ` Xuewen Yan
2023-03-01 11:23                       ` Dietmar Eggemann
2023-03-01 13:29                         ` Vincent Guittot
2023-06-30 14:40                       ` Qais Yousef
2023-08-21  7:51                         ` Xuewen Yan
2023-08-22 15:54                           ` Vincent Guittot
2023-08-23  2:03                             ` Xuewen Yan
2023-08-26 20:46                               ` Qais Yousef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230227112102.028b2f81@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=ke.wang@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=xuewen.yan@unisoc.com \
    --cc=zhaoyang.huang@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®