The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Chen Yu <yu.c.chen@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Chunxin Zang <zangchunxin@lixiang.com>,
	linux-kernel@vger.kernel.org, Chen Yu <yu.chen.surf@gmail.com>,
	kernel test robot <oliver.sang@intel.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Subject: Re: [PATCH v2] sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running
Date: Mon, 30 Sep 2024 09:50:45 +0200	[thread overview]
Message-ID: <20240930075045.GB5594@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20240925085440.358138-1-yu.c.chen@intel.com>

On Wed, Sep 25, 2024 at 04:54:40PM +0800, Chen Yu wrote:
> Commit 85e511df3cec ("sched/eevdf: Allow shorter slices to wakeup-preempt")
> introduced a mechanism that a wakee with shorter slice could preempt
> the current running task. It also lower the bar for the current task
> to be preempted, by checking the rq->nr_running instead of cfs_rq->nr_running
> when the current task has ran out of time slice. But there is a scenario
> that is problematic. Say, if there is 1 cfs task and 1 rt task, before
> 85e511df3cec, update_deadline() will not trigger a reschedule, and after
> 85e511df3cec, since rq->nr_running is 2 and resched is true, a resched_curr()
> would happen.
> 

So I'm applying the patch (that change was not indended), but I'm a
little confused by the above description. If we already have TIF_RESCHED
set, then doing resched_curr() should be a NO-OP.

At the same time, how can we have an RT task and not get TIF_RESCHED
set.

  parent reply	other threads:[~2024-09-30  7:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25  8:54 [PATCH v2] sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running Chen Yu
2024-09-27  1:54 ` Honglei Wang
2024-09-27  6:56   ` Chen Yu
2024-09-27 13:38     ` Honglei Wang
2024-09-28  6:28       ` Chen Yu
2024-09-29 13:51         ` Oliver Sang
2024-09-30  2:04           ` Honglei Wang
2024-09-30  2:22             ` Chen Yu
2024-09-30  6:11               ` Honglei Wang
2024-09-30  7:50 ` Peter Zijlstra [this message]
2024-09-30 11:01   ` Chen Yu
2024-10-04 10:16 ` [tip: sched/urgent] " tip-bot2 for Chen Yu

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=20240930075045.GB5594@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oliver.sang@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yu.c.chen@intel.com \
    --cc=yu.chen.surf@gmail.com \
    --cc=zangchunxin@lixiang.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