|
|
Log in / Subscribe / Register

sched_ext: Implement DSQ iterator

From:  Tejun Heo <tj-AT-kernel.org>
To:  ast-AT-kernel.org, andrii-AT-kernel.org
Subject:  [PATCHSET v5 sched_ext/for-6.11] sched_ext: Implement DSQ iterator
Date:  Mon, 08 Jul 2024 14:40:21 -1000
Message-ID:  <20240709004041.1111039-1-tj@kernel.org>
Cc:  linux-kernel-AT-vger.kernel.org, bpf-AT-vger.kernel.org, void-AT-manifault.com, kernel-team-AT-meta.com
Archive-link:  Article

DSQs are very opaque in the consumption path. The BPF scheduler has no way
of knowing which tasks are being considered and which is picked. This
patchset adds BPF DSQ iterator to allow BPF schedulers more flexibility in
how DSQs are used. See the 0002 patch for more details.

Changes from v4 (https://lore.kernel.org/all/Zn9oEjsm_1aWb35J@slm.duckdns....):

- Comment added to clarify use of naked list_empty(&dsq->list) test.

- scx_qmap changes separated into its own patch (0003).

There are no functional changes since v4. I'll apply these patches to
sched_ext/for-6.11 with the outstanding acks.

This patchset contains the following three patches:

 0001-sched_ext-Take-out-priq-and-flags-from-scx_dsq_node.patch
 0002-sched_ext-Implement-DSQ-iterator.patch
 0003-sched_ext-scx_qmap-Add-an-example-usage-of-DSQ-itera.patch

and is also availalbe in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-dsq-iter-v5

diffstat follows. Thanks.

 include/linux/sched/ext.h                |   13 +-
 init/init_task.c                         |    2
 kernel/sched/ext.c                       |  244 ++++++++++++++++++++++++++++++++++++++++++++++-------
 tools/sched_ext/include/scx/common.bpf.h |    3
 tools/sched_ext/scx_qmap.bpf.c           |   25 +++++
 tools/sched_ext/scx_qmap.c               |    8 +
 6 files changed, 259 insertions(+), 36 deletions(-)

--
tejun




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds