<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched.c, branch v2.6.37</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=v2.6.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-12-19T22:24:27Z</updated>
<entry>
<title>sched: Remove debugging check</title>
<updated>2010-12-19T22:24:27Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2010-12-19T22:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=050c6c9b896625d9fa498265be17b82c5fc65257'/>
<id>urn:sha1:050c6c9b896625d9fa498265be17b82c5fc65257</id>
<content type='text'>
Linus reported that the new warning introduced by commit f26f9aff6aaf
"Sched: fix skip_clock_update optimization" triggers. The need_resched
flag can be set by other CPUs asynchronously so this debug check is
bogus - remove it.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
LKML-Reference: &lt;AANLkTinJ8hAG1TpyC+CSYPR47p48+1=E7fiC45hMXT_1@mail.gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Fix the irqtime code for 32bit</title>
<updated>2010-12-16T10:17:47Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-12-09T13:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e92c20183ed0579d94501311b81c42b65cb2129'/>
<id>urn:sha1:8e92c20183ed0579d94501311b81c42b65cb2129</id>
<content type='text'>
Since the irqtime accounting is using non-atomic u64 and can be read
from remote cpus (writes are strictly cpu local, reads are not) we
have to deal with observing partial updates.

When we do observe partial updates the clock movement (in particular,
-&gt;clock_task movement) will go funny (in either direction), a
subsequent clock update (observing the full update) will make it go
funny in the oposite direction.

Since we rely on these clocks to be strictly monotonic we cannot
suffer backwards motion. One possible solution would be to simply
ignore all backwards deltas, but that will lead to accounting
artefacts, most notable: clock_task + irq_time != clock, this
inaccuracy would end up in user visible stats.

Therefore serialize the reads using a seqcount.

Reviewed-by: Venkatesh Pallipadi &lt;venki@google.com&gt;
Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Tested-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1292242434.6803.200.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Fix the irqtime code to deal with u64 wraps</title>
<updated>2010-12-16T10:17:46Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-12-09T13:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe44d62122829959e960bc699318d58966922a69'/>
<id>urn:sha1:fe44d62122829959e960bc699318d58966922a69</id>
<content type='text'>
Some ARM systems have a short sched_clock() [ which needs to be fixed
too ], but this exposed a bug in the irq_time code as well, it doesn't
deal with wraps at all.

Fix the irq_time code to deal with u64 wraps by re-writing the code to
only use delta increments, which avoids the whole issue.

Reviewed-by: Venkatesh Pallipadi &lt;venki@google.com&gt;
Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Tested-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1292242433.6803.199.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Sched: fix skip_clock_update optimization</title>
<updated>2010-12-08T19:15:06Z</updated>
<author>
<name>Mike Galbraith</name>
<email>efault@gmx.de</email>
</author>
<published>2010-12-08T10:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f26f9aff6aaf67e9a430d16c266f91b13a5bff64'/>
<id>urn:sha1:f26f9aff6aaf67e9a430d16c266f91b13a5bff64</id>
<content type='text'>
idle_balance() drops/retakes rq-&gt;lock, leaving the previous task
vulnerable to set_tsk_need_resched().  Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.

Need resched confused the skip_clock_update logic, which assumes
that the next call to update_rq_clock() will come nearly immediately
after being set.  Make the optimization robust against the waking
a sleeper before it sucessfully deschedules case by checking that
the current task has not been dequeued before setting the flag,
since it is that useless clock update we're trying to save, and
clear unconditionally in schedule() proper instead of conditionally
in put_prev_task().

Signed-off-by: Mike Galbraith &lt;efault@gmx.de&gt;
Reported-by: Bjoern B. Brandenburg &lt;bbb.lst@gmail.com&gt;
Tested-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: stable@kernel.org
LKML-Reference: &lt;1291802742.1417.9.camel@marge.simson.net&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Cure more NO_HZ load average woes</title>
<updated>2010-12-08T19:15:04Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-11-30T18:48:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f004f5a696a9434b7214d0d3cbd0525ee77d428'/>
<id>urn:sha1:0f004f5a696a9434b7214d0d3cbd0525ee77d428</id>
<content type='text'>
There's a long-running regression that proved difficult to fix and
which is hitting certain people and is rather annoying in its effects.

Damien reported that after 74f5187ac8 (sched: Cure load average vs
NO_HZ woes) his load average is unnaturally high, he also noted that
even with that patch reverted the load avgerage numbers are not
correct.

The problem is that the previous patch only solved half the NO_HZ
problem, it addressed the part of going into NO_HZ mode, not of
comming out of NO_HZ mode. This patch implements that missing half.

When comming out of NO_HZ mode there are two important things to take
care of:

 - Folding the pending idle delta into the global active count.
 - Correctly aging the averages for the idle-duration.

So with this patch the NO_HZ interaction should be complete and
behaviour between CONFIG_NO_HZ=[yn] should be equivalent.

Furthermore, this patch slightly changes the load average computation
by adding a rounding term to the fixed point multiplication.

Reported-by: Damien Wyart &lt;damien.wyart@free.fr&gt;
Reported-by: Tim McGrath &lt;tmhikaru@gmail.com&gt;
Tested-by: Damien Wyart &lt;damien.wyart@free.fr&gt;
Tested-by: Orion Poplawski &lt;orion@cora.nwra.com&gt;
Tested-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: stable@kernel.org
Cc: Chase Douglas &lt;chase.douglas@canonical.com&gt;
LKML-Reference: &lt;1291129145.32004.874.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Fix cross-sched-class wakeup preemption</title>
<updated>2010-11-11T13:37:23Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-10-31T11:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e5a74059f9059d330744eac84873b1b99657008'/>
<id>urn:sha1:1e5a74059f9059d330744eac84873b1b99657008</id>
<content type='text'>
Instead of dealing with sched classes inside each check_preempt_curr()
implementation, pull out this logic into the generic wakeup preemption
path.

This fixes a hang in KVM (and others) where we are waiting for the
stop machine thread to run ...

Reported-by: Markus Trippelsdorf &lt;markus@trippelsdorf.de&gt;
Tested-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Tested-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1288891946.2039.31.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Use group weight, idle cpu metrics to fix imbalances during idle</title>
<updated>2010-11-10T22:13:56Z</updated>
<author>
<name>Suresh Siddha</name>
<email>suresh.b.siddha@intel.com</email>
</author>
<published>2010-09-17T22:02:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aae6d3ddd8b90f5b2c8d79a2b914d1706d124193'/>
<id>urn:sha1:aae6d3ddd8b90f5b2c8d79a2b914d1706d124193</id>
<content type='text'>
Currently we consider a sched domain to be well balanced when the imbalance
is less than the domain's imablance_pct. As the number of cores and threads
are increasing, current values of imbalance_pct (for example 25% for a
NUMA domain) are not enough to detect imbalances like:

a) On a WSM-EP system (two sockets, each having 6 cores and 12 logical threads),
24 cpu-hogging tasks get scheduled as 13 on one socket and 11 on another
socket. Leading to an idle HT cpu.

b) On a hypothetial 2 socket NHM-EX system (each socket having 8 cores and
16 logical threads), 16 cpu-hogging tasks can get scheduled as 9 on one
socket and 7 on another socket. Leaving one core in a socket idle
whereas in another socket we have a core having both its HT siblings busy.

While this issue can be fixed by decreasing the domain's imbalance_pct
(by making it a function of number of logical cpus in the domain), it
can potentially cause more task migrations across sched groups in an
overloaded case.

Fix this by using imbalance_pct only during newly_idle and busy
load balancing. And during idle load balancing, check if there
is an imbalance in number of idle cpu's across the busiest and this
sched_group or if the busiest group has more tasks than its weight that
the idle cpu in this_group can pull.

Reported-by: Nikhil Rao &lt;ncrao@google.com&gt;
Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1284760952.2676.11.camel@sbsiddha-MOBL3.sc.intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-10-29T15:05:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-29T15:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37542b6a7e73e81f8c066a48e6911e476ee3b22f'/>
<id>urn:sha1:37542b6a7e73e81f8c066a48e6911e476ee3b22f</id>
<content type='text'>
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched_stat: Update sched_info_queue/dequeue() code comments
  sched, cgroup: Fixup broken cgroup movement
</content>
</entry>
<entry>
<title>sched, cgroup: Fixup broken cgroup movement</title>
<updated>2010-10-22T12:16:45Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-10-15T13:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2b5ce022acf5e9f52f7b78c5579994fdde191d4'/>
<id>urn:sha1:b2b5ce022acf5e9f52f7b78c5579994fdde191d4</id>
<content type='text'>
Dima noticed that we fail to correct the -&gt;vruntime of sleeping tasks
when we move them between cgroups.

Reported-by: Dima Zavin &lt;dima@android.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Tested-by: Mike Galbraith &lt;efault@gmx.de&gt;
LKML-Reference: &lt;1287150604.29097.1513.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-10-21T19:55:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-21T19:55:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc4016f48161454a9a8e5eb209b0693c6cde9f62'/>
<id>urn:sha1:bc4016f48161454a9a8e5eb209b0693c6cde9f62</id>
<content type='text'>
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (29 commits)
  sched: Export account_system_vtime()
  sched: Call tick_check_idle before __irq_enter
  sched: Remove irq time from available CPU power
  sched: Do not account irq time to current task
  x86: Add IRQ_TIME_ACCOUNTING
  sched: Add IRQ_TIME_ACCOUNTING, finer accounting of irq time
  sched: Add a PF flag for ksoftirqd identification
  sched: Consolidate account_system_vtime extern declaration
  sched: Fix softirq time accounting
  sched: Drop group_capacity to 1 only if local group has extra capacity
  sched: Force balancing on newidle balance if local group has capacity
  sched: Set group_imb only a task can be pulled from the busiest cpu
  sched: Do not consider SCHED_IDLE tasks to be cache hot
  sched: Drop all load weight manipulation for RT tasks
  sched: Create special class for stop/migrate work
  sched: Unindent labels
  sched: Comment updates: fix default latency and granularity numbers
  tracing/sched: Add sched_pi_setprio tracepoint
  sched: Give CPU bound RT tasks preference
  sched: Try not to migrate higher priority RT tasks
  ...
</content>
</entry>
</feed>
