From: Tejun Heo <tj@kernel.org>
To: void@manifault.com
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
schatzberg.dan@gmail.com, mingo@redhat.com, peterz@infradead.org,
changwoo@igalia.com, righi.andrea@gmail.com
Subject: [PATCHSET v2 sched_ext/for-6.11] sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches
Date: Wed, 10 Jul 2024 15:13:57 -1000 [thread overview]
Message-ID: <20240711011434.1421572-1-tj@kernel.org> (raw)
This is v2. Changes from v1:
(http://lkml.kernel.org/r/20240709212137.1199269-1-tj@kernel.org)
- 0003-sched_ext-Make-rf-optional-for-dispatch_to_local_dsq.patch is
replaced with
0003-sched_ext-Unpin-and-repin-rq-lock-from-balance_scx.patch.
balance_scx() now unpins the rq lock and the inner functions don't handle
rq pinning. This simplifies code quite a bit.
- schedule_deferred() was missing a return after balance_work scheduling.
Fixed.
- Other misc changes including UP build warning fix.
In ops.dispatch(), SCX_DSQ_LOCAL_ON can be used to dispatch the task to the
local DSQ of any CPU. However, during direct dispatch from ops.select_cpu()
and ops.enqueue(), this isn't allowed. This is because dispatching to the
local DSQ of a remote CPU requires locking both the task's current and new
rq's and such double locking can't be done directly from ops.enqueue(). This
gap in API forces schedulers into work-arounds which are not straightforward
or optimal such as skipping direct dispatches in such cases.
This patchset implements SCX_DSQ_LOCAL_ON support for direct dispatches.
This patchset contains the following patches:
0001-sched-Move-struct-balance_callback-definition-upward.patch
0002-sched_ext-Open-code-task_linked_on_dsq.patch
0003-sched_ext-Unpin-and-repin-rq-lock-from-balance_scx.patch
0004-sched_ext-s-SCX_RQ_BALANCING-SCX_RQ_IN_BALANCE-and-a.patch
0005-sched_ext-Allow-SCX_DSQ_LOCAL_ON-for-direct-dispatch.patch
0006-sched_ext-scx_qmap-Pick-idle-CPU-for-direct-dispatch.patch
While 0001 is a scheduler core change, all it does is moving the definition
of struct balance_callback so that it's visible for struct scx_rq
definition. If there are no objections, it'd make sense to route it through
the sched_ext tree with the rest of the changes.
and is also available in the following git branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-ddsp-local-on-v2
diffstat follows. Thanks.
kernel/sched/ext.c | 283 +++++++++++++++++++++++++++++++++++++++++++--------------------
kernel/sched/sched.h | 19 ++--
tools/sched_ext/scx_qmap.bpf.c | 39 ++++++--
tools/sched_ext/scx_qmap.c | 5 -
4 files changed, 240 insertions(+), 106 deletions(-)
--
tejun
next reply other threads:[~2024-07-11 1:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 1:13 Tejun Heo [this message]
2024-07-11 1:13 ` [PATCH 1/6] sched: Move struct balance_callback definition upward Tejun Heo
2024-07-11 21:06 ` Tejun Heo
2024-07-11 1:13 ` [PATCH 2/6] sched_ext: Open-code task_linked_on_dsq() Tejun Heo
2024-07-11 1:14 ` [PATCH 3/6] sched_ext: Unpin and repin rq lock from balance_scx() Tejun Heo
2024-07-11 2:05 ` David Vernet
2024-07-11 1:14 ` [PATCH 4/6] sched_ext: s/SCX_RQ_BALANCING/SCX_RQ_IN_BALANCE/ and add SCX_RQ_IN_WAKEUP Tejun Heo
2024-07-11 1:14 ` [PATCH 5/6] sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches Tejun Heo
2024-07-11 2:05 ` David Vernet
2024-07-11 1:14 ` [PATCH 6/6] sched_ext/scx_qmap: Pick idle CPU for direct dispatch on !wakeup enqueues Tejun Heo
2024-07-12 18:22 ` [PATCHSET v2 sched_ext/for-6.11] sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches Tejun Heo
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=20240711011434.1421572-1-tj@kernel.org \
--to=tj@kernel.org \
--cc=changwoo@igalia.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=righi.andrea@gmail.com \
--cc=schatzberg.dan@gmail.com \
--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 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®