<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched/rt.c, branch v3.5</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=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-06-06T14:52:26Z</updated>
<entry>
<title>sched/rt: Fix lockdep annotation within find_lock_lowest_rq()</title>
<updated>2012-06-06T14:52:26Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2012-05-17T19:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f1b43936f0ecad14770634c021cf4a929aec74d'/>
<id>urn:sha1:7f1b43936f0ecad14770634c021cf4a929aec74d</id>
<content type='text'>
Roland Dreier reported spurious, hard to trigger lockdep warnings
within the scheduler - without any real lockup.

This bit gives us the right clue:

&gt; [89945.640512]  [&lt;ffffffff8103fa1a&gt;] double_lock_balance+0x5a/0x90
&gt; [89945.640568]  [&lt;ffffffff8104c546&gt;] push_rt_task+0xc6/0x290

if you look at that code you'll find the double_lock_balance() in
question is the one in find_lock_lowest_rq() [yay for inlining].

Now find_lock_lowest_rq() has a bug.. it fails to use
double_unlock_balance() in one exit path, if this results in a retry in
push_rt_task() we'll call double_lock_balance() again, at which point
we'll run into said lockdep confusion.

Reported-by: Roland Dreier &lt;roland@kernel.org&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1337282386.4281.77.camel@twins
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/rt: Fix SCHED_RR across cgroups</title>
<updated>2012-05-30T12:02:25Z</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2012-05-17T04:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=454c79999f7eaedcdf4c15c449e43902980cbdf5'/>
<id>urn:sha1:454c79999f7eaedcdf4c15c449e43902980cbdf5</id>
<content type='text'>
task_tick_rt() has an optimization to only reschedule SCHED_RR tasks
if they were the only element on their rq.  However, with cgroups
a SCHED_RR task could be the only element on its per-cgroup rq but
still be competing with other SCHED_RR tasks in its parent's
cgroup.  In this case, the SCHED_RR task in the child cgroup would
never yield at the end of its timeslice.  If the child cgroup
rt_runtime_us was the same as the parent cgroup rt_runtime_us,
the task in the parent cgroup would starve completely.

Modify task_tick_rt() to check that the task is the only task on its
rq, and that the each of the scheduling entities of its ancestors
is also the only entity on its rq.

Signed-off-by: Colin Cross &lt;ccross@android.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1337229266-15798-1-git-send-email-ccross@android.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Move nr_cpus_allowed out of 'struct sched_rt_entity'</title>
<updated>2012-05-30T12:02:25Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2012-04-23T10:11:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29baa7478ba47d746e3625c91d3b2afbf46b4312'/>
<id>urn:sha1:29baa7478ba47d746e3625c91d3b2afbf46b4312</id>
<content type='text'>
Since nr_cpus_allowed is used outside of sched/rt.c and wants to be
used outside of there more, move it to a more natural site.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/n/tip-kr61f02y9brwzkh6x53pdptm@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tip/sched/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into sched/core</title>
<updated>2012-04-14T13:12:04Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2012-04-14T13:12:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cbb62148cd686c2d3618861deb15eeb83744405'/>
<id>urn:sha1:4cbb62148cd686c2d3618861deb15eeb83744405</id>
<content type='text'>
Pull a scheduler optimization commit from Steven Rostedt.

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched_rt: Avoid unnecessary dequeue and enqueue of pushable tasks in set_cpus_allowed_rt()</title>
<updated>2012-04-12T20:59:37Z</updated>
<author>
<name>Kirill Tkhai</name>
<email>tkhai@yandex.ru</email>
</author>
<published>2012-04-11T05:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d3d5ada56a692d36a9d55858881147ec10cfeb6'/>
<id>urn:sha1:8d3d5ada56a692d36a9d55858881147ec10cfeb6</id>
<content type='text'>
Migration status depends on a difference of weight from 0 and 1.
If weight &gt; 1 (&lt;= 1) and old weight &lt;= 1 (&gt; 1) then task becomes
pushable (or not pushable). We are not insterested in its exact
values, is it 3 or 4, for example.
Now if we are changing affinity from a set of 3 cpus to a set of 4, the-
task will be dequeued and enqueued sequentially without important
difference in comparison with initial state. The only difference is in
internal representation of plist queue of pushable tasks and the fact
that the task may won't be the first in a sequence of the same priority
tasks. But it seems to me it gives nothing.

Link: http://lkml.kernel.org/r/273741334120764@web83.yandex.ru

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Tkhai Kirill &lt;tkhai@yandex.ru&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>sched/rt: Improve pick_next_highest_task_rt()</title>
<updated>2012-03-27T12:52:12Z</updated>
<author>
<name>Michael J Wang</name>
<email>mjwang@broadcom.com</email>
</author>
<published>2012-03-19T22:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b028abc779b67b699daff55e27d2432f8d92666'/>
<id>urn:sha1:1b028abc779b67b699daff55e27d2432f8d92666</id>
<content type='text'>
Avoid extra work by continuing on to the next rt_rq if the highest
prio task in current rt_rq is the same priority as our candidate
task.

More detailed explanation:  if next is not NULL, then we have found a
candidate task, and its priority is next-&gt;prio.  Now we are looking
for an even higher priority task in the other rt_rq's.  idx is the
highest priority in the current candidate rt_rq.  In the current 3.3
code, if idx is equal to next-&gt;prio, we would start scanning the tasks
in that rt_rq and replace the current candidate task with a task from
that rt_rq.  But the new task would only have a priority that is equal
to our previous candidate task, so we have not advanced our goal of
finding a higher prio task.  So we should avoid the extra work by
continuing on to the next rt_rq if idx is equal to next-&gt;prio.

Signed-off-by: Michael J Wang &lt;mjwang@broadcom.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Reviewed-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/2EF88150C0EF2C43A218742ED384C1BC0FC83D6B@IRVEXCHMB08.corp.ad.broadcom.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>printk/sched: Introduce special printk_sched() for those awkward moments</title>
<updated>2012-03-12T19:43:16Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2012-02-27T09:47:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ccf3e8306156a28213adc720aba807e9a901ad5'/>
<id>urn:sha1:3ccf3e8306156a28213adc720aba807e9a901ad5</id>
<content type='text'>
There's a few awkward printk()s inside of scheduler guts that people
prefer to keep but really are rather deadlock prone. Fudge around it
by storing the text in a per-cpu buffer and poll it using the existing
printk_tick() handler.

This will drop output when its more frequent than once a tick, however
only the affinity thing could possible go that fast and for that just
one should suffice to notify the admin he's done something silly..

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: http://lkml.kernel.org/n/tip-wua3lmkt3dg8nfts66o6brne@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched/rt: Do not throttle when PI boosting</title>
<updated>2012-03-01T09:28:02Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2011-10-18T20:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7abc63b1bd412f7655b62ef3e35c3c11c5134636'/>
<id>urn:sha1:7abc63b1bd412f7655b62ef3e35c3c11c5134636</id>
<content type='text'>
When a runqueue has rt_runtime_us = 0 then the only way it can
accumulate rt_time is via PI boosting. That causes the runqueue
to be throttled and replenishing does not change anything due to
rt_runtime_us = 0. So avoid that situation by clearing rt_time and
skip the throttling alltogether.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
[ Changelog ]
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/n/tip-7x70cypsotjb4jvcor3edctk@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched/rt: Keep period timer ticking when rt throttling is active</title>
<updated>2012-03-01T09:28:01Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2011-10-18T20:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42c62a589f1ccbf38a02cb732231f9c2fccc5ab0'/>
<id>urn:sha1:42c62a589f1ccbf38a02cb732231f9c2fccc5ab0</id>
<content type='text'>
When a runqueue is throttled we cannot disable the period timer
because that timer is the only way to undo the throttling.

We got stale throttling entries when a rq was throttled and then the
global sysctl was disabled, which stopped the timer.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
[ Added changelog ]
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/n/tip-nuj34q52p6ro7szapuz84i0v@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Make initial SCHED_RR timeslace DEF_TIMESLICE</title>
<updated>2012-02-22T11:28:29Z</updated>
<author>
<name>Hiroshi Shimamoto</name>
<email>h-shimamoto@ct.jp.nec.com</email>
</author>
<published>2012-02-16T05:52:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de5bdff7a72acc281219be2b8edeeca1fd81c542'/>
<id>urn:sha1:de5bdff7a72acc281219be2b8edeeca1fd81c542</id>
<content type='text'>
Current the initial SCHED_RR timeslice of init_task is HZ, which means
1s, and is not same as the default SCHED_RR timeslice DEF_TIMESLICE.

Change that initial timeslice to the DEF_TIMESLICE.

Signed-off-by: Hiroshi Shimamoto &lt;h-shimamoto@ct.jp.nec.com&gt;
[ s/DEF_TIMESLICE/RR_TIMESLICE/g ]
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/4F3C9995.3010800@ct.jp.nec.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
