All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: "Ingo Molnar" <mingo@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
	"Valentin Schneider" <vschneid@redhat.com>,
	"K Prateek Nayak" <kprateek.nayak@amd.com>,
	"Andrea Righi" <arighi@nvidia.com>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	linux-kernel@vger.kernel.org,
	"David Haufe" <dhaufe@simplextrading.com>,
	"Cao Ruichuang" <create0818@163.com>,
	"Furkan Çalışkan" <frn1furkan10@gmail.com>
Subject: Re: [PATCH v2] sched/deadline: Make dl-server nohz full aware
Date: Fri, 2 Oct 2026 11:20:58 +0200	[thread overview]
Message-ID: <20261002092058.GA409038@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20261001142735.GT2009045@noisy.programming.kicks-ass.net>

On Thu, Oct 01, 2026 at 04:27:36PM +0200, Peter Zijlstra wrote:

> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 0663c00c41c0..5388bde93410 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -401,6 +401,7 @@ static void __dl_clear_params(struct sched_dl_entity *dl_se);
>   */
>  static void task_non_contending(struct sched_dl_entity *dl_se, bool dl_task)
>  {
> +	enum hrtimer_mode mode = HRTIMER_MODE_REL_HARD;
>  	struct hrtimer *timer = &dl_se->inactive_timer;
>  	struct rq *rq = rq_of_dl_se(dl_se);
>  	struct dl_rq *dl_rq = &rq->dl;
> @@ -459,8 +460,10 @@ static void task_non_contending(struct sched_dl_entity *dl_se, bool dl_task)
>  	dl_se->dl_non_contending = 1;
>  	if (!dl_server(dl_se))
>  		get_task_struct(dl_task_of(dl_se));
> +	else
> +		mode |= HRTIMER_MODE_PINNED;
>  
> -	hrtimer_start(timer, ns_to_ktime(zerolag_time), HRTIMER_MODE_REL_HARD);
> +	hrtimer_start(timer, ns_to_ktime(zerolag_time), mode);
>  }
>  
>  static void task_contending(struct sched_dl_entity *dl_se, int flags)
> @@ -1061,6 +1064,7 @@ static inline u64 dl_next_period(struct sched_dl_entity *dl_se)
>   */
>  static int start_dl_timer(struct sched_dl_entity *dl_se)
>  {
> +	enum hrtimer_mode mode = HRTIMER_MODE_ABS_HARD;
>  	struct hrtimer *timer = &dl_se->dl_timer;
>  	struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
>  	struct rq *rq = rq_of_dl_rq(dl_rq);
> @@ -1112,7 +1116,9 @@ static int start_dl_timer(struct sched_dl_entity *dl_se)
>  	if (!hrtimer_is_queued(timer)) {
>  		if (!dl_server(dl_se))
>  			get_task_struct(dl_task_of(dl_se));
> -		hrtimer_start(timer, act, HRTIMER_MODE_ABS_HARD);
> +		else
> +			mode |= HRTIMER_MODE_PINNED;
> +		hrtimer_start(timer, act, mode);
>  	}
>  
>  	return 1;

Bah, this would require something like:

  hrtime_start_on(timer, act, mode, rq->cpu);

which we don't currently have. The problem is that on remote enqueue, we
can start the dl-server remotely, and it then being pinned, means its on
the 'wrong' CPU.

Doing remote hrtimer_start isn't entirely trivial either. So scrap this
for now :-(

  parent reply	other threads:[~2026-10-02  9:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  9:13 [PATCH v2] sched/deadline: Make dl-server nohz full aware Juri Lelli
2026-05-13 11:13 ` Andrea Righi
2026-05-15 15:56 ` Valentin Schneider
2026-07-21 12:18 ` Ionut Nechita (Wind River)
2026-09-24 17:02 ` Ionut Nechita (Wind River)
2026-09-25 15:07   ` Juri Lelli
2026-10-01 12:57     ` Frederic Weisbecker
2026-10-01 13:49       ` Juri Lelli
2026-10-05 12:49     ` Ionut Nechita (Wind River)
2026-10-05 13:20     ` [RFC PATCH] sched/deadline: keep nohz_full tickless while the fair server is deferred Ionut Nechita (Wind River)
2026-10-12 12:41       ` Juri Lelli
2026-10-01 14:27 ` [PATCH v2] sched/deadline: Make dl-server nohz full aware Peter Zijlstra
2026-10-01 14:33   ` Peter Zijlstra
2026-10-01 15:25     ` Juri Lelli
2026-10-01 15:33       ` Peter Zijlstra
2026-10-01 15:11   ` Juri Lelli
2026-10-02  9:20   ` Peter Zijlstra [this message]
2026-10-05 14:32   ` Frederic Weisbecker

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=20261002092058.GA409038@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=arighi@nvidia.com \
    --cc=bsegall@google.com \
    --cc=create0818@163.com \
    --cc=dhaufe@simplextrading.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=frn1furkan10@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.