<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched/debug.c, branch v6.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-02-08T19:16:22Z</updated>
<entry>
<title>Merge tag 'sched-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2025-02-08T19:16:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-02-08T19:16:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7b92e8969cd60a585629cef8d19b7ef330bc171'/>
<id>urn:sha1:c7b92e8969cd60a585629cef8d19b7ef330bc171</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar:
 "Fix a cfs_rq-&gt;h_nr_runnable accounting bug that trips up a defensive
  SCHED_WARN_ON() on certain workloads. The bug is believed to be
  (accidentally) self-correcting, hence no behavioral side effects are
  expected.

  Also print se.slice in debug output, since this value can now be set
  via the syscall ABI and can be useful to track"

* tag 'sched-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/debug: Provide slice length for fair tasks
  sched/fair: Fix inaccurate h_nr_runnable accounting with delayed dequeue
</content>
</entry>
<entry>
<title>sched/debug: Provide slice length for fair tasks</title>
<updated>2025-01-31T09:45:33Z</updated>
<author>
<name>Christian Loehle</name>
<email>christian.loehle@arm.com</email>
</author>
<published>2025-01-29T17:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9065ce69754dece78606c8bbb3821449272e56bf'/>
<id>urn:sha1:9065ce69754dece78606c8bbb3821449272e56bf</id>
<content type='text'>
Since commit:

  857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion")

... we have the userspace per-task tunable slice length, which is
a key parameter that is otherwise difficult to obtain, so provide
it in /proc/$PID/sched.

[ mingo: Clarified the changelog. ]

Signed-off-by: Christian Loehle &lt;christian.loehle@arm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/453349b1-1637-42f5-a7b2-2385392b5956@arm.com
</content>
</entry>
<entry>
<title>sched/debug: Change need_resched warnings to pr_err</title>
<updated>2025-01-13T13:10:23Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2025-01-10T00:24:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8061b9f5e111a3012f8b691e5b75dd81eafbb793'/>
<id>urn:sha1:8061b9f5e111a3012f8b691e5b75dd81eafbb793</id>
<content type='text'>
need_resched warnings, if enabled, are treated as WARNINGs.  If
kernel.panic_on_warn is enabled, then this causes a kernel panic.

It's highly unlikely that a panic is desired for these warnings, only a
stack trace is normally required to debug and resolve.

Thus, switch need_resched warnings to simply be a printk with an
associated stack trace so they are no longer in scope for panic_on_warn.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Madadi Vineeth Reddy &lt;vineethr@linux.ibm.com&gt;
Acked-by: Josh Don &lt;joshdon@google.com&gt;
Link: https://lkml.kernel.org/r/e8d52023-5291-26bd-5299-8bb9eb604929@google.com
</content>
</entry>
<entry>
<title>sched/fair: Rename cfs_rq.nr_running into nr_queued</title>
<updated>2024-12-09T10:48:12Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:46:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=736c55a02c477ad31c57ae4c69130f437855e051'/>
<id>urn:sha1:736c55a02c477ad31c57ae4c69130f437855e051</id>
<content type='text'>
Rename cfs_rq.nr_running into cfs_rq.nr_queued which better reflects the
reality as the value includes both the ready to run tasks and the delayed
dequeue tasks.

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-10-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Remove unused cfs_rq.idle_nr_running</title>
<updated>2024-12-09T10:48:12Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43eef7c3a4a65e258244d63a8992d0a8d70e5974'/>
<id>urn:sha1:43eef7c3a4a65e258244d63a8992d0a8d70e5974</id>
<content type='text'>
cfs_rq.idle_nr_running field is not used anywhere so we can remove the
useless associated computation. Last user went in commit 5e963f2bd465
("sched/fair: Commit to EEVDF").

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-9-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Rename cfs_rq.idle_h_nr_running into h_nr_idle</title>
<updated>2024-12-09T10:48:12Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31898e7b87dd2833eb5dd6aa60ab2a5880c4c12f'/>
<id>urn:sha1:31898e7b87dd2833eb5dd6aa60ab2a5880c4c12f</id>
<content type='text'>
Use same naming convention as others starting with h_nr_* and rename
idle_h_nr_running into h_nr_idle.
The "running" is not correct anymore as it includes delayed dequeue tasks
as well.

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-8-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Removed unsued cfs_rq.h_nr_delayed</title>
<updated>2024-12-09T10:48:11Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9216582b0bfb17889eebcf96fb41cd67a3d71133'/>
<id>urn:sha1:9216582b0bfb17889eebcf96fb41cd67a3d71133</id>
<content type='text'>
h_nr_delayed is not used anymore. We now have:
 - h_nr_runnable which tracks tasks ready to run
 - h_nr_queued which tracks enqueued tasks either ready to run or
   delayed dequeue

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-7-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Add new cfs_rq.h_nr_runnable</title>
<updated>2024-12-09T10:48:11Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:45:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2a295bffeaf9461ecba76dc9e4780c898c94f03'/>
<id>urn:sha1:c2a295bffeaf9461ecba76dc9e4780c898c94f03</id>
<content type='text'>
With delayed dequeued feature, a sleeping sched_entity remains queued in
the rq until its lag has elapsed. As a result, it stays also visible
in the statistics that are used to balance the system and in particular
the field cfs.h_nr_queued when the sched_entity is associated to a task.

Create a new h_nr_runnable that tracks only queued and runnable tasks.

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-5-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Rename h_nr_running into h_nr_queued</title>
<updated>2024-12-09T10:48:11Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2024-12-02T17:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b8a702d943827130cc00ae36075eff5500f86f1'/>
<id>urn:sha1:7b8a702d943827130cc00ae36075eff5500f86f1</id>
<content type='text'>
With delayed dequeued feature, a sleeping sched_entity remains queued
in the rq until its lag has elapsed but can't run.
Rename h_nr_running into h_nr_queued to reflect this new behavior.

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-4-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/eevdf: More PELT vs DELAYED_DEQUEUE</title>
<updated>2024-12-09T10:48:09Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T17:45:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76f2f783294d7d55c2564e2dfb0a7279ba0bc264'/>
<id>urn:sha1:76f2f783294d7d55c2564e2dfb0a7279ba0bc264</id>
<content type='text'>
Vincent and Dietmar noted that while
commit fc1892becd56 ("sched/eevdf: Fixup PELT vs DELAYED_DEQUEUE") fixes
the entity runnable stats, it does not adjust the cfs_rq runnable stats,
which are based off of h_nr_running.

Track h_nr_delayed such that we can discount those and adjust the
signal.

Fixes: fc1892becd56 ("sched/eevdf: Fixup PELT vs DELAYED_DEQUEUE")
Closes: https://lore.kernel.org/lkml/a9a45193-d0c6-4ba2-a822-464ad30b550e@arm.com/
Closes: https://lore.kernel.org/lkml/CAKfTPtCNUvWE_GX5LyvTF-WdxUT=ZgvZZv-4t=eWntg5uOFqiQ@mail.gmail.com/
[ Fixes checkpatch warnings and rebased ]
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Reported-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: "Peter Zijlstra (Intel)" &lt;peterz@infradead.org&gt;
Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: K Prateek Nayak &lt;kprateek.nayak@amd.com&gt;
Link: https://lore.kernel.org/r/20241202174606.4074512-3-vincent.guittot@linaro.org
</content>
</entry>
</feed>
