<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched/features.h, branch v6.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-12-23T14:59:56Z</updated>
<entry>
<title>sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true)</title>
<updated>2023-12-23T14:59:56Z</updated>
<author>
<name>Vincent Guittot</name>
<email>vincent.guittot@linaro.org</email>
</author>
<published>2023-12-01T16:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7736ae5572eb344c090fbef9621a228e7e3d6276'/>
<id>urn:sha1:7736ae5572eb344c090fbef9621a228e7e3d6276</id>
<content type='text'>
sched_feat(UTIL_EST_FASTUP) has been added to easily disable the feature
in order to check for possibly related regressions. After 3 years, it has
never been used and no regression has been reported. Let's remove it
and make fast increase a permanent behavior.

Signed-off-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Reviewed-by: Hongyan Xia &lt;hongyan.xia2@arm.com&gt;
Reviewed-by: Tang Yizhou &lt;yizhou.tang@shopee.com&gt;
Reviewed-by: Yanteng Si &lt;siyanteng@loongson.cn&gt; [for the Chinese translation]
Reviewed-by: Alex Shi &lt;alexs@kernel.org&gt;
Link: https://lore.kernel.org/r/20231201161652.1241695-2-vincent.guittot@linaro.org
</content>
</entry>
<entry>
<title>sched/fair: Remove SIS_PROP</title>
<updated>2023-10-24T08:38:44Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-10-20T10:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=984ffb6a4366752c949f7b39640aecdce222607f'/>
<id>urn:sha1:984ffb6a4366752c949f7b39640aecdce222607f</id>
<content type='text'>
SIS_UTIL seems to work well, lets remove the old thing.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Link: https://lkml.kernel.org/r/20231020134337.GD33965@noisy.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>sched/eevdf: Curb wakeup-preemption</title>
<updated>2023-08-17T15:07:07Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-08-16T13:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63304558ba5dcaaff9e052ee43cfdcc7f9c29e85'/>
<id>urn:sha1:63304558ba5dcaaff9e052ee43cfdcc7f9c29e85</id>
<content type='text'>
Mike and others noticed that EEVDF does like to over-schedule quite a
bit -- which does hurt performance of a number of benchmarks /
workloads.

In particular, what seems to cause over-scheduling is that when lag is
of the same order (or larger) than the request / slice then placement
will not only cause the task to be placed left of current, but also
with a smaller deadline than current, which causes immediate
preemption.

[ notably, lag bounds are relative to HZ ]

Mike suggested we stick to picking 'current' for as long as it's
eligible to run, giving it uninterrupted runtime until it reaches
parity with the pack.

Augment Mike's suggestion by only allowing it to exhaust it's initial
request.

One random data point:

echo NO_RUN_TO_PARITY &gt; /debug/sched/features
perf stat -a -e context-switches --repeat 10 -- perf bench sched messaging -g 20 -t -l 5000

	3,723,554        context-switches      ( +-  0.56% )
	9.5136 +- 0.0394 seconds time elapsed  ( +-  0.41% )

echo RUN_TO_PARITY &gt; /debug/sched/features
perf stat -a -e context-switches --repeat 10 -- perf bench sched messaging -g 20 -t -l 5000

	2,556,535        context-switches      ( +-  0.51% )
	9.2427 +- 0.0302 seconds time elapsed  ( +-  0.33% )

Suggested-by: Mike Galbraith &lt;umgwanakikbuti@gmail.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20230816134059.GC982867@hirez.programming.kicks-ass.net
</content>
</entry>
<entry>
<title>Merge branch 'sched/eevdf' into sched/core</title>
<updated>2023-08-10T07:05:43Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2023-08-10T07:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b41bbb33cf75d251a816768580819aec17be718d'/>
<id>urn:sha1:b41bbb33cf75d251a816768580819aec17be718d</id>
<content type='text'>
Pick up the EEVDF work into the main branch - it's looking good so far.

 Conflicts:
	kernel/sched/features.h

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/fair: Block nohz tick_stop when cfs bandwidth in use</title>
<updated>2023-08-02T14:19:26Z</updated>
<author>
<name>Phil Auld</name>
<email>pauld@redhat.com</email>
</author>
<published>2023-07-12T13:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88c56cfeaec4642aee8aac58b38d5708c6aae0d3'/>
<id>urn:sha1:88c56cfeaec4642aee8aac58b38d5708c6aae0d3</id>
<content type='text'>
CFS bandwidth limits and NOHZ full don't play well together.  Tasks
can easily run well past their quotas before a remote tick does
accounting.  This leads to long, multi-period stalls before such
tasks can run again. Currently, when presented with these conflicting
requirements the scheduler is favoring nohz_full and letting the tick
be stopped. However, nohz tick stopping is already best-effort, there
are a number of conditions that can prevent it, whereas cfs runtime
bandwidth is expected to be enforced.

Make the scheduler favor bandwidth over stopping the tick by setting
TICK_DEP_BIT_SCHED when the only running task is a cfs task with
runtime limit enabled. We use cfs_b-&gt;hierarchical_quota to
determine if the task requires the tick.

Add check in pick_next_task_fair() as well since that is where
we have a handle on the task that is actually going to be running.

Add check in sched_can_stop_tick() to cover some edge cases such
as nr_running going from 2-&gt;1 and the 1 remains the running task.

Reviewed-By: Ben Segall &lt;bsegall@google.com&gt;
Signed-off-by: Phil Auld &lt;pauld@redhat.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20230712133357.381137-3-pauld@redhat.com
</content>
</entry>
<entry>
<title>sched/fair: Commit to EEVDF</title>
<updated>2023-07-19T07:43:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-31T11:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e963f2bd4654a202a8a05aa3a86cb0300b10e6c'/>
<id>urn:sha1:5e963f2bd4654a202a8a05aa3a86cb0300b10e6c</id>
<content type='text'>
EEVDF is a better defined scheduling policy, as a result it has less
heuristics/tunables. There is no compelling reason to keep CFS around.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531124604.137187212@infradead.org
</content>
</entry>
<entry>
<title>sched/fair: Commit to lag based placement</title>
<updated>2023-07-19T07:43:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-31T11:58:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76cae9dbe185b82aeb0640aa2b73da4a8e0088ce'/>
<id>urn:sha1:76cae9dbe185b82aeb0640aa2b73da4a8e0088ce</id>
<content type='text'>
Removes the FAIR_SLEEPERS code in favour of the new LAG based
placement.

Specifically, the whole FAIR_SLEEPER thing was a very crude
approximation to make up for the lack of lag based placement,
specifically the 'service owed' part. This is important for things
like 'starve' and 'hackbench'.

One side effect of FAIR_SLEEPER is that it caused 'small' unfairness,
specifically, by always ignoring up-to 'thresh' sleeptime it would
have a 50%/50% time distribution for a 50% sleeper vs a 100% runner,
while strictly speaking this should (of course) result in a 33%/67%
split (as CFS will also do if the sleep period exceeds 'thresh').

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531124604.000198861@infradead.org
</content>
</entry>
<entry>
<title>sched/fair: Implement an EEVDF-like scheduling policy</title>
<updated>2023-07-19T07:43:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-31T11:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=147f3efaa24182a21706bca15eab2f3f4630b5fe'/>
<id>urn:sha1:147f3efaa24182a21706bca15eab2f3f4630b5fe</id>
<content type='text'>
Where CFS is currently a WFQ based scheduler with only a single knob,
the weight. The addition of a second, latency oriented parameter,
makes something like WF2Q or EEVDF based a much better fit.

Specifically, EEVDF does EDF like scheduling in the left half of the
tree -- those entities that are owed service. Except because this is a
virtual time scheduler, the deadlines are in virtual time as well,
which is what allows over-subscription.

EEVDF has two parameters:

 - weight, or time-slope: which is mapped to nice just as before

 - request size, or slice length: which is used to compute
   the virtual deadline as: vd_i = ve_i + r_i/w_i

Basically, by setting a smaller slice, the deadline will be earlier
and the task will be more eligible and ran earlier.

Tick driven preemption is driven by request/slice completion; while
wakeup preemption is driven by the deadline.

Because the tree is now effectively an interval tree, and the
selection is no longer 'leftmost', over-scheduling is less of a
problem.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531124603.931005524@infradead.org
</content>
</entry>
<entry>
<title>sched/fair: Add lag based placement</title>
<updated>2023-07-19T07:43:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-31T11:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86bfbb7ce4f67a88df2639198169b685668e7349'/>
<id>urn:sha1:86bfbb7ce4f67a88df2639198169b685668e7349</id>
<content type='text'>
With the introduction of avg_vruntime, it is possible to approximate
lag (the entire purpose of introducing it in fact). Use this to do lag
based placement over sleep+wake.

Specifically, the FAIR_SLEEPERS thing places things too far to the
left and messes up the deadline aspect of EEVDF.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531124603.794929315@infradead.org
</content>
</entry>
<entry>
<title>sched/fair: Remove sched_feat(START_DEBIT)</title>
<updated>2023-07-19T07:43:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-31T11:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0c2ff903c320d3fd3c2c604dc401b3b7c0a1d13'/>
<id>urn:sha1:e0c2ff903c320d3fd3c2c604dc401b3b7c0a1d13</id>
<content type='text'>
With the introduction of avg_vruntime() there is no need to use worse
approximations. Take the 0-lag point as starting point for inserting
new tasks.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531124603.722361178@infradead.org
</content>
</entry>
</feed>
