All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Juri Lelli <juri.lelli@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	John Stultz <jstultz@google.com>,
	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>,
	Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>, Shuah Khan <shuah@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Christian Loehle <christian.loehle@arm.com>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	Luigi De Matteis <ldematteis123@gmail.com>,
	sched-ext@lists.linux.dev, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET v10 sched_ext/for-6.19] Add a deadline server for sched_ext tasks
Date: Wed, 5 Nov 2025 15:39:29 +0100	[thread overview]
Message-ID: <aQthoTGw0U4o1eHw@gpd4> (raw)
In-Reply-To: <aQtdQnLxnh7z7a0w@jlelli-thinkpadt14gen4.remote.csb>

On Wed, Nov 05, 2025 at 03:20:50PM +0100, Juri Lelli wrote:
> On 05/11/25 14:59, Peter Zijlstra wrote:
> > On Wed, Nov 05, 2025 at 02:47:39PM +0100, Andrea Righi wrote:
> > > On Wed, Oct 29, 2025 at 08:08:37PM +0100, Andrea Righi wrote:
> > > > sched_ext tasks can be starved by long-running RT tasks, especially since
> > > > RT throttling was replaced by deadline servers to boost only SCHED_NORMAL
> > > > tasks.
> > > > 
> > > > Several users in the community have reported issues with RT stalling
> > > > sched_ext tasks. This is fairly common on distributions or environments
> > > > where applications like video compositors, audio services, etc. run as RT
> > > > tasks by default.
> > > > 
> > > > Example trace (showing a per-CPU kthread stalled due to the sway Wayland
> > > > compositor running as an RT task):
> > > > 
> > > >  runnable task stall (kworker/0:0[106377] failed to run for 5.043s)
> > > >  ...
> > > >  CPU 0   : nr_run=3 flags=0xd cpu_rel=0 ops_qseq=20646200 pnt_seq=45388738
> > > >            curr=sway[994] class=rt_sched_class
> > > >    R kworker/0:0[106377] -5043ms
> > > >        scx_state/flags=3/0x1 dsq_flags=0x0 ops_state/qseq=0/0
> > > >        sticky/holding_cpu=-1/-1 dsq_id=0x8000000000000002 dsq_vtime=0 slice=20000000
> > > >        cpus=01
> > > > 
> > > > This is often perceived as a bug in the BPF schedulers, but in reality
> > > > schedulers can't do much: RT tasks run outside their control and can
> > > > potentially consume 100% of the CPU bandwidth.
> > > > 
> > > > Fix this by adding a sched_ext deadline server, so that sched_ext tasks are
> > > > also boosted and do not suffer starvation.
> > > > 
> > > > Two kselftests are also provided to verify the starvation fixes and
> > > > bandwidth allocation is correct.
> > > 
> > > Peter, Juri, this has now been tested quite extensively on our side and
> > > we're considering applying these patches to Tejun's sched_ext branch.
> > > 
> > > Do you have any objections or concerns?
> > 
> > Yeah, I want to finish this first:
> > 
> >   https://lkml.kernel.org/r/20251101000057.GA2184199@noisy.programming.kicks-ass.net
> > 
> > Because as is, the whole dl_server stuff isn't quite right.
> > 
> 
> And I'm spending time on "[PATCH 04/11] sched/deadline: Add support to
> initialize and remove dl_server bandwidth" which I am still not 100%
> sure is correct (or that is correct how we handle setting runtime to 0
> for fair_server today). Apologies, had some travelling and pto, but
> should be able to write something more about it in the next few days.

No problem and no rush, I just wanted to follow up to make sure I didn't
miss anything. :)

Thank you both,
–Andrea

      reply	other threads:[~2025-11-05 14:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29 19:08 [PATCHSET v10 sched_ext/for-6.19] Add a deadline server for sched_ext tasks Andrea Righi
2025-10-29 19:08 ` [PATCH 01/11] sched/debug: Fix updating of ppos on server write ops Andrea Righi
2025-10-29 19:08 ` [PATCH 02/11] sched/debug: Stop and start server based on if it was active Andrea Righi
2025-11-06  7:13   ` Juri Lelli
2025-11-06 16:39     ` Andrea Righi
2025-11-07  6:51       ` Juri Lelli
2025-11-12 17:35         ` Andrea Righi
2025-10-29 19:08 ` [PATCH 03/11] sched/deadline: Clear the defer params Andrea Righi
2025-10-29 19:08 ` [PATCH 04/11] sched/deadline: Add support to initialize and remove dl_server bandwidth Andrea Righi
2025-11-06  9:49   ` Juri Lelli
2025-11-06 17:09     ` Andrea Righi
2025-11-07 13:53       ` Juri Lelli
2025-10-29 19:08 ` [PATCH 05/11] sched/deadline: Add a server arg to dl_server_update_idle_time() Andrea Righi
2025-10-29 19:08 ` [PATCH 06/11] sched_ext: Add a DL server for sched_ext tasks Andrea Righi
2025-11-06 10:59   ` Juri Lelli
2025-11-06 17:15     ` Andrea Righi
2025-10-29 19:08 ` [PATCH 07/11] sched/debug: Add support to change sched_ext server params Andrea Righi
2025-10-29 19:08 ` [PATCH 08/11] sched/deadline: Account ext server bandwidth Andrea Righi
2025-10-29 19:08 ` [PATCH 09/11] sched_ext: Selectively enable ext and fair DL servers Andrea Righi
2025-10-29 19:08 ` [PATCH 10/11] selftests/sched_ext: Add test for sched_ext dl_server Andrea Righi
2025-10-30 16:49   ` Christian Loehle
2025-10-30 16:57     ` Andrea Righi
2025-10-29 19:08 ` [PATCH 11/11] selftests/sched_ext: Add test for DL server total_bw consistency Andrea Righi
2025-10-30 17:00 ` [PATCHSET v10 sched_ext/for-6.19] Add a deadline server for sched_ext tasks Christian Loehle
2025-11-05 13:47 ` Andrea Righi
2025-11-05 13:59   ` Peter Zijlstra
2025-11-05 14:20     ` Juri Lelli
2025-11-05 14:39       ` Andrea Righi [this message]

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=aQthoTGw0U4o1eHw@gpd4 \
    --to=arighi@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=bsegall@google.com \
    --cc=changwoo@igalia.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=emil@etsalapatis.com \
    --cc=joelagnelf@nvidia.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=ldematteis123@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=shuah@kernel.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=void@manifault.com \
    --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.