From: Peter Zijlstra <peterz@infradead.org>
To: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, David Vernet <void@manifault.com>,
Ingo Molnar <mingo@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [GIT PULL] sched_ext: Initial pull request for v6.11
Date: Wed, 14 Aug 2024 00:53:07 +0200 [thread overview]
Message-ID: <20240813225307.GC10328@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <Zruwioj86jQz8Oq6@slm.duckdns.org>
On Tue, Aug 13, 2024 at 09:14:18AM -1000, Tejun Heo wrote:
> Hello, Peter.
>
> On Sat, Aug 10, 2024 at 10:45:42PM +0200, Peter Zijlstra wrote:
> ...
> > > It is tricky because the kernel part can't make assumptions about whether
> > > two tasks are even on the same timeline. In the usual scheduling path, this
> > > isn't a problem as the decision is made by the BPF scheduler from balance()
> > > - if it wants to keep running the current task, it doesn't dispatch a new
> > > one. Otherwise, it dispatches the next task.
> >
> > But I have a question.. don't you clear scx.slice when a task needs to
> > be preempted? That is, why isn't that condition sufficient to determine
> > if curr has precedence over the first queued? If curr and it is still
> > queued and its slice is non-zero, take curr.
>
> scx.slice is used a bit different from other sched classes mostly because
> there are two layers - the SCX core and the BPF scheduler itself. The BPF
> scheduler uses scx.slice to tell the SCX core to "don't bother asking about
> it until the current slice has been exhausted" - ie. it's a way to offload
> things like tick handling and preemption by higher priority sched classes to
> SCX core. When scx.slice expires, the BPF scheduler's dispatch() is called
> which can then decide whether to replenish the slice of the current task or
> something else should run and so on.
Right, but can't we flip that on its head and state that when scx.slice
is non-zero, we should pick current and not bother asking for what's
next?
next prev parent reply other threads:[~2024-08-13 22:53 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 22:32 [GIT PULL] sched_ext: Initial pull request for v6.11 Tejun Heo
2024-07-23 16:33 ` Peter Zijlstra
2024-07-23 19:34 ` Tejun Heo
2024-07-24 8:52 ` Peter Zijlstra
2024-07-24 17:38 ` David Vernet
2024-07-31 1:36 ` Tejun Heo
2024-08-02 11:10 ` Peter Zijlstra
2024-08-02 16:09 ` Tejun Heo
2024-08-02 17:37 ` Peter Zijlstra
2024-08-06 21:10 ` Peter Zijlstra
2024-08-06 21:34 ` Tejun Heo
2024-08-06 21:55 ` Peter Zijlstra
2024-08-06 22:09 ` Tejun Heo
2024-08-10 20:45 ` Peter Zijlstra
2024-08-13 19:14 ` Tejun Heo
2024-08-13 22:53 ` Peter Zijlstra [this message]
2024-08-21 23:08 ` Tejun Heo
2024-08-06 19:56 ` Tejun Heo
2024-08-06 20:18 ` Peter Zijlstra
2024-08-06 20:20 ` Tejun Heo
2024-08-02 12:20 ` Peter Zijlstra
2024-08-02 18:47 ` Tejun Heo
2024-08-06 8:27 ` Peter Zijlstra
2024-08-06 19:17 ` Tejun Heo
2024-07-25 1:19 ` Qais Yousef
2024-07-30 9:04 ` Peter Zijlstra
2024-07-31 1:11 ` Tejun Heo
2024-07-31 1:22 ` Tejun Heo
2024-08-01 13:17 ` Qais Yousef
2024-08-01 16:36 ` Tejun Heo
2024-08-05 1:44 ` Qais Yousef
2024-08-01 2:50 ` Russell Haley
2024-08-01 15:52 ` 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=20240813225307.GC10328@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ast@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=void@manifault.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.