mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Clark Williams <williams@redhat.com>,
	arighi@nvidia.com
Subject: Re: [RFC PATCH] sched/deadline: Avoid dl_server boosting with expired deadline
Date: Fri, 31 Oct 2025 16:41:22 +0100	[thread overview]
Message-ID: <2daa2e6217eeaa239616303626c0d73d808ae947.camel@redhat.com> (raw)
In-Reply-To: <20251031152005.GT3245006@noisy.programming.kicks-ass.net>

On Fri, 2025-10-31 at 16:20 +0100, Peter Zijlstra wrote:
> On Fri, Oct 31, 2025 at 02:24:17PM +0100, Gabriele Monaco wrote:
> > 
> > Different scenario if I have the CPU busy with other tasks (e.g. RT
> > policies), there I can see the server stopping and starting again.
> > After I do this I seem to get a different behaviour (even some boosting
> > after idle), I'm trying to understand what's going on.
> > 

After running some heavy RT workload (stress-ng --cpu 10 --sched rr) I do see
the server stopping and starting as the models would expect, but somehow it's
always boosting as soon as it's started.

Apparently dl_defer_running is always 1 in that scenario. Perhaps running idle
counts as running something too, so it never defers. But I can't really see how
this happens..

<idle>-0     12.964637: (+8)     sched_switch:         swapper/9:0 [120] R ==> irq/50:212 [49]
irq/50-212   12.964699: (+58)    sched_wakeup:         trace-cmd:544 [120] CPU:000
irq/50-212   12.964831: (+24)    sched_migrate_task:   comm=trace-cmd pid=544 prio=120 orig_cpu=0 dest_cpu=9
irq/50-212   12.964842: (+11)    event_nomiss:         -9: idle x dl_server_start -> idle
irq/50-212   12.964843: (+1)     sched_dl_server_start: comm=server pid=-9 runtime=16238881 deadline=13592407587 yielded=0
irq/50-212   12.964854: (+11)    bprint:               pick_task_dl: Picking server 9 (armed 1 running 1)
irq/50-212   12.964861: (+7)     event_nomiss:         -9: idle x sched_switch_in -> running
irq/50-212   12.964862: (+1)     sched_switch:         irq/50:212 [49] S ==> trace-cmd:544 [120]

The trace-cmd in the example above is boosted, like highlighted by that bprint	
just before.

> Ooooh, because idle time is accounted against the server budget too.
> 
> That is, idle and running fair are both [2] in my comment. So we never
> get to [5].

Yeah that must be it, however I don't think it explains the other curious
behaviour above.

> Humm, let me noodle a bit more on this. Also, I should see if I can get
> graphviz to draw ascii art state diagrams :-)

Dot doesn't do it but graph-easy does reasonably well.

Thanks,
Gabriele


  reply	other threads:[~2025-10-31 15:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 12:29 Gabriele Monaco
2025-10-14  9:30 ` Gabriele Monaco
2025-10-14  9:54 ` Peter Zijlstra
2025-10-14 10:05   ` Gabriele Monaco
2025-10-14 10:25     ` Peter Zijlstra
2025-10-14 15:32       ` Gabriele Monaco
2025-10-14 16:01         ` Juri Lelli
2025-10-14 19:33           ` Peter Zijlstra
2025-10-15  5:40             ` Juri Lelli
2025-10-20 14:11               ` Peter Zijlstra
2025-10-22 10:11                 ` Gabriele Monaco
2025-10-30 18:42                   ` Peter Zijlstra
2025-10-31 13:05                     ` Peter Zijlstra
2025-10-31 13:24                       ` Gabriele Monaco
2025-10-31 15:20                         ` Peter Zijlstra
2025-10-31 15:41                           ` Gabriele Monaco [this message]
2025-10-31 15:44                             ` Peter Zijlstra
2025-10-31 15:51                               ` Gabriele Monaco
2025-11-01  0:00                               ` Peter Zijlstra
2025-11-11  9:58                                 ` Gabriele Monaco
2025-11-11 11:17                                   ` Peter Zijlstra
2025-11-11 11:24                                     ` Peter Zijlstra
2025-11-11 11:37                                 ` [tip: sched/core] sched/deadline: Fix dl_server stop condition tip-bot2 for Peter Zijlstra
2025-11-01  0:08                             ` [RFC PATCH] sched/deadline: Avoid dl_server boosting with expired deadline Peter Zijlstra
2025-11-01  8:43                               ` Gabriele Monaco
2025-11-11 11:37                 ` [tip: sched/core] sched/deadline: Fix dl_server time accounting tip-bot2 for Peter Zijlstra

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=2daa2e6217eeaa239616303626c0d73d808ae947.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=arighi@nvidia.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=williams@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 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®