<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/sched_ext, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-02T13:15:21+00:00</updated>
<entry>
<title>sched_ext: Make qmap dump operation non-destructive</title>
<updated>2025-11-02T13:15:21+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2025-09-23T19:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8297de569e56efa365ae6022d70ad3513e2a73b0'/>
<id>urn:sha1:8297de569e56efa365ae6022d70ad3513e2a73b0</id>
<content type='text'>
[ Upstream commit d452972858e5cfa4262320ab74fe8f016460b96f ]

The qmap dump operation was destructively consuming queue entries while
displaying them. As dump can be triggered anytime, this can easily lead to
stalls. Add a temporary dump_store queue and modify the dump logic to pop
entries, display them, and then restore them back to the original queue.
This allows dump operations to be performed without affecting the
scheduler's queue state.

Note that if racing against new enqueues during dump, ordering can get
mixed up, but this is acceptable for debugging purposes.

Acked-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/sched_ext: Add helper to check task migration state</title>
<updated>2025-03-22T19:54:28+00:00</updated>
<author>
<name>Andrea Righi</name>
<email>arighi@nvidia.com</email>
</author>
<published>2025-01-25T17:14:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee06d5c81041ead5269a3c17595211d3e7c10183'/>
<id>urn:sha1:ee06d5c81041ead5269a3c17595211d3e7c10183</id>
<content type='text'>
commit 5f52bbf2f6e0997394cf9c449d44e1c80ff4282c upstream.

Introduce a new helper for BPF schedulers to determine whether a task
can migrate or not (supporting both SMP and UP systems).

Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
Signed-off-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h.</title>
<updated>2025-02-21T13:01:21+00:00</updated>
<author>
<name>Chuyi Zhou</name>
<email>zhouchuyi@bytedance.com</email>
</author>
<published>2025-02-12T07:19:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=465255d52628a30583f1c050f4493a2ab207372d'/>
<id>urn:sha1:465255d52628a30583f1c050f4493a2ab207372d</id>
<content type='text'>
[ Upstream commit 2e2006c91c842c551521434466f9b4324719c9a7 ]

Now BPF only supports bpf_list_push_{front,back}_impl kfunc, not bpf_list_
push_{front,back}.

This patch fix this issue. Without this patch, if we use bpf_list kfunc
in scx, the BPF verifier would complain:

libbpf: extern (func ksym) 'bpf_list_push_back': not found in kernel or
module BTFs
libbpf: failed to load object 'scx_foo'
libbpf: failed to load BPF skeleton 'scx_foo': -EINVAL

With this patch, the bpf list kfunc will work as expected.

Signed-off-by: Chuyi Zhou &lt;zhouchuyi@bytedance.com&gt;
Fixes: 2a52ca7c98960 ("sched_ext: Add scx_simple and scx_example_qmap example schedulers")
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched_ext: fix application of sizeof to pointer</title>
<updated>2025-01-09T12:33:33+00:00</updated>
<author>
<name>guanjing</name>
<email>guanjing@cmss.chinamobile.com</email>
</author>
<published>2024-11-17T02:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00aca33249f719b92ddac61eeab20702d6ca178b'/>
<id>urn:sha1:00aca33249f719b92ddac61eeab20702d6ca178b</id>
<content type='text'>
[ Upstream commit f24d192985cbd6782850fdbb3839039da2f0ee76 ]

sizeof when applied to a pointer typed expression gives the size of
the pointer.

The proper fix in this particular case is to code sizeof(*cpuset)
instead of sizeof(cpuset).

This issue was detected with the help of Coccinelle.

Fixes: 22a920209ab6 ("sched_ext: Implement tickless support")
Signed-off-by: guanjing &lt;guanjing@cmss.chinamobile.com&gt;
Acked-by: Andrea Righi &lt;arighi@nvidia.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched_ext: Update scx_show_state.py to match scx_ops_bypass_depth's new type</title>
<updated>2024-11-05T21:45:27+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2024-11-05T21:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a759bf0dfc4db3cb6556fc79c7c98da3a46b2b80'/>
<id>urn:sha1:a759bf0dfc4db3cb6556fc79c7c98da3a46b2b80</id>
<content type='text'>
0e7ffff1b811 ("scx: Fix raciness in scx_ops_bypass()") converted
scx_ops_bypass_depth from an atomic to an int. Update scx_show_state.py
accordingly.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Fixes: 0e7ffff1b811 ("scx: Fix raciness in scx_ops_bypass()")
</content>
</entry>
<entry>
<title>sched_ext: Make cast_mask() inline</title>
<updated>2024-10-25T22:19:44+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2024-10-25T22:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7724abf0ca77460cb06ac3d5e4352a5c2289c3ae'/>
<id>urn:sha1:7724abf0ca77460cb06ac3d5e4352a5c2289c3ae</id>
<content type='text'>
cast_mask() doesn't do any actual work and is defined in a header file.
Force it to be inline. When it is not inlined and the function is not used,
it can cause verificaiton failures like the following:

  # tools/testing/selftests/sched_ext/runner -t minimal
  ===== START =====
  TEST: minimal
  DESCRIPTION: Verify we can load a fully minimal scheduler
  OUTPUT:
  libbpf: prog 'cast_mask': missing BPF prog type, check ELF section name '.text'
  libbpf: prog 'cast_mask': failed to load: -22
  libbpf: failed to load object 'minimal'
  libbpf: failed to load BPF skeleton 'minimal': -22
  ERR: minimal.c:20
  Failed to open and load skel
  not ok 1 minimal #
  =====  END  =====

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Fixes: a748db0c8c6a ("tools/sched_ext: Receive misc updates from SCX repo")
</content>
</entry>
<entry>
<title>sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED</title>
<updated>2024-10-07T20:16:18+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2024-09-27T23:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b671793c7d95f020791415cbbcc82b9c007d19c'/>
<id>urn:sha1:9b671793c7d95f020791415cbbcc82b9c007d19c</id>
<content type='text'>
scx_qmap and other schedulers in the SCX repo are using SCX_ENQ_WAKEUP to
tell whether ops.select_cpu() was called. This is incorrect as
ops.select_cpu() can be skipped in the wakeup path and leads to e.g.
incorrectly skipping direct dispatch for tasks that are bound to a single
CPU.

sched core has been updated to specify ENQUEUE_RQ_SELECTED if
-&gt;select_task_rq() was called. Map it to SCX_ENQ_CPU_SELECTED and update
scx_qmap to test it instead of SCX_ENQ_WAKEUP.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Cc: Daniel Hodges &lt;hodges.daniel.scott@gmail.com&gt;
Cc: Changwoo Min &lt;multics69@gmail.com&gt;
Cc: Andrea Righi &lt;andrea.righi@linux.dev&gt;
Cc: Dan Schatzberg &lt;schatzberg.dan@gmail.com&gt;
</content>
</entry>
<entry>
<title>sched_ext: Add __weak markers to BPF helper function decalarations</title>
<updated>2024-10-02T16:53:12+00:00</updated>
<author>
<name>Vishal Chourasia</name>
<email>vishalc@linux.ibm.com</email>
</author>
<published>2024-10-02T07:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fcbc423577ce28b5e470a2a47fed6724430cccdb'/>
<id>urn:sha1:fcbc423577ce28b5e470a2a47fed6724430cccdb</id>
<content type='text'>
Fix build errors by adding __weak markers to BPF helper function
declarations in header files. This resolves static assertion failures
in scx_qmap.bpf.c and scx_flatcg.bpf.c where functions like
scx_bpf_dispatch_from_dsq_set_slice, scx_bpf_dispatch_from_dsq_set_vtime,
and scx_bpf_task_cgroup were missing the __weak attribute.

[1] https://lore.kernel.org/all/ZvvfUqRNM4-jYQzH@linux.ibm.com

Signed-off-by: Vishal Chourasia &lt;vishalc@linux.ibm.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>scx_flatcg: Use a user DSQ for fallback instead of SCX_DSQ_GLOBAL</title>
<updated>2024-09-26T22:56:46+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2024-09-26T22:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9c809f4137c3c0f962226c10d245d3ce2fd5b7c'/>
<id>urn:sha1:c9c809f4137c3c0f962226c10d245d3ce2fd5b7c</id>
<content type='text'>
scx_flatcg was using SCX_DSQ_GLOBAL for fallback handling. However, it is
assuming that SCX_DSQ_GLOBAL isn't automatically consumed, which was true a
while ago but is no longer the case. Also, there are further changes planned
for SCX_DSQ_GLOBAL which will disallow explicit consumption from it. Switch
to a user DSQ for fallback.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
</content>
</entry>
<entry>
<title>tools/sched_ext: Receive misc updates from SCX repo</title>
<updated>2024-09-25T22:22:37+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2024-09-25T22:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a748db0c8c6a88da66c3ab3791bd1a229f4a7fee'/>
<id>urn:sha1:a748db0c8c6a88da66c3ab3791bd1a229f4a7fee</id>
<content type='text'>
Receive misc tools/sched_ext updates from https://github.com/sched-ext/scx
to sync userspace bits.

- LSP macros to help language servers.

- bpf_cpumask_weight() declaration and cast_mask() helper.

- Cosmetic updates to scx_flatcg.bpf.c.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
