<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched, branch v3.4</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/sched?h=v3.4</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/sched?h=v3.4'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-09T10:27:35Z</updated>
<entry>
<title>sched: Fix KVM and ia64 boot crash due to sched_groups circular linked list assumption</title>
<updated>2012-05-09T10:27:35Z</updated>
<author>
<name>Igor Mammedov</name>
<email>imammedo@redhat.com</email>
</author>
<published>2012-05-09T10:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=30b4e9eb783d94e9f5d503b15eb31720679ae1c7'/>
<id>urn:sha1:30b4e9eb783d94e9f5d503b15eb31720679ae1c7</id>
<content type='text'>
If we have one cpu that failed to boot and boot cpu gave up on
waiting for it and then another cpu is being booted, kernel
might crash with following OOPS:

   BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
   IP: [&lt;ffffffff812c3630&gt;] __bitmap_weight+0x30/0x80
   Call Trace:
       [&lt;ffffffff8108b9b6&gt;] build_sched_domains+0x7b6/0xa50

The crash happens in init_sched_groups_power() that expects
sched_groups to be circular linked list. However it is not
always true, since sched_groups preallocated in __sdt_alloc are
initialized in build_sched_groups and it may exit early

        if (cpu != cpumask_first(sched_domain_span(sd)))
                return 0;

without initializing sd-&gt;groups-&gt;next field.

Fix bug by initializing next field right after sched_group was
allocated.

Also-Reported-by: Jiang Liu &lt;liuj97@gmail.com&gt;
Signed-off-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Cc: a.p.zijlstra@chello.nl
Cc: pjt@google.com
Cc: seto.hidetoshi@jp.fujitsu.com
Link: http://lkml.kernel.org/r/1336559908-32533-1-git-send-email-imammedo@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Fix OOPS when build_sched_domains() percpu allocation fails</title>
<updated>2012-04-26T10:54:53Z</updated>
<author>
<name>he, bo</name>
<email>bo.he@intel.com</email>
</author>
<published>2012-04-25T11:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb2cf2c660971bea0ad86a9a5c19ad39eab61344'/>
<id>urn:sha1:fb2cf2c660971bea0ad86a9a5c19ad39eab61344</id>
<content type='text'>
Under extreme memory used up situations, percpu allocation
might fail. We hit it when system goes to suspend-to-ram,
causing a kworker panic:

 EIP: [&lt;c124411a&gt;] build_sched_domains+0x23a/0xad0
 Kernel panic - not syncing: Fatal exception
 Pid: 3026, comm: kworker/u:3
 3.0.8-137473-gf42fbef #1

 Call Trace:
  [&lt;c18cc4f2&gt;] panic+0x66/0x16c
  [...]
  [&lt;c1244c37&gt;] partition_sched_domains+0x287/0x4b0
  [&lt;c12a77be&gt;] cpuset_update_active_cpus+0x1fe/0x210
  [&lt;c123712d&gt;] cpuset_cpu_inactive+0x1d/0x30
  [...]

With this fix applied build_sched_domains() will return -ENOMEM and
the suspend attempt fails.

Signed-off-by: he, bo &lt;bo.he@intel.com&gt;
Reviewed-by: Zhang, Yanmin &lt;yanmin.zhang@intel.com&gt;
Reviewed-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
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;
Cc: &lt;stable@kernel.org&gt;
Link: http://lkml.kernel.org/r/1335355161.5892.17.camel@hebo
[ So, we fail to deallocate a CPU because we cannot allocate RAM :-/
  I don't like that kind of sad behavior but nevertheless it should
  not crash under high memory load. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Fix more load-balancing fallout</title>
<updated>2012-04-26T10:54:52Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2012-04-17T11:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb95308ee2a69403909e111837b9068c64cfc349'/>
<id>urn:sha1:eb95308ee2a69403909e111837b9068c64cfc349</id>
<content type='text'>
Commits 367456c756a6 ("sched: Ditch per cgroup task lists for
load-balancing") and 5d6523ebd ("sched: Fix load-balance wreckage")
left some more wreckage.

By setting loop_max unconditionally to -&gt;nr_running load-balancing
could take a lot of time on very long runqueues (hackbench!). So keep
the sysctl as max limit of the amount of tasks we'll iterate.

Furthermore, the min load filter for migration completely fails with
cgroups since inequality in per-cpu state can easily lead to such
small loads :/

Furthermore the change to add new tasks to the tail of the queue
instead of the head seems to have some effect.. not quite sure I
understand why.

Combined these fixes solve the huge hackbench regression reported by
Tim when hackbench is ran in a cgroup.

Reported-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Acked-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
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/r/1335365763.28150.267.camel@twins
[ got rid of the CONFIG_PREEMPT tuning and made small readability edits ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-03-31T20:35:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-31T20:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f22e08a79f3765fecf060b225a46931c94fb0a92'/>
<id>urn:sha1:f22e08a79f3765fecf060b225a46931c94fb0a92</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar.

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()
  sched: Fix __schedule_bug() output when called from an interrupt
  sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback
</content>
</entry>
<entry>
<title>sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()</title>
<updated>2012-03-31T08:43:36Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-03-30T14:10:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e3831edd59edf57ca11fc289f08961b20baf5146'/>
<id>urn:sha1:e3831edd59edf57ca11fc289f08961b20baf5146</id>
<content type='text'>
The function for_each_cpu_mask() expects a *pointer* to struct
cpumask as its second argument, whereas select_fallback_rq()
passes the value itself.

And moreover, for_each_cpu_mask() has been marked as obselete
in include/linux/cpumask.h. So move to the more appropriate
for_each_cpu() variant.

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Liu Chuansheng &lt;chuansheng.liu@intel.com&gt;
Cc: vapier@gentoo.org
Cc: rusty@rustcorp.com.au
Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-03-29T21:46:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-29T21:46:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7fda0412c5f7afdd1a5ff518f98dee5157266d8a'/>
<id>urn:sha1:7fda0412c5f7afdd1a5ff518f98dee5157266d8a</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar.

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  cpusets: Remove an unused variable
  sched/rt: Improve pick_next_highest_task_rt()
  sched: Fix select_fallback_rq() vs cpu_active/cpu_online
  sched/x86/smp: Do not enable IRQs over calibrate_delay()
  sched: Fix compiler warning about declared inline after use
  MAINTAINERS: Update email address for SCHEDULER and PERF EVENTS
</content>
</entry>
<entry>
<title>Merge branch 'sched/arch' into sched/urgent</title>
<updated>2012-03-29T10:48:22Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2012-03-29T10:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f56ee7b68fecd45d25bdcf2eda7507797594424'/>
<id>urn:sha1:1f56ee7b68fecd45d25bdcf2eda7507797594424</id>
<content type='text'>
Merge reason: It has not gone upstream via the ARM tree, merge it via
              the scheduler tree.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Fix __schedule_bug() output when called from an interrupt</title>
<updated>2012-03-29T06:34:45Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-03-29T00:10:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6135fc1eb4b1c9ae5f535507ed59591bab51e630'/>
<id>urn:sha1:6135fc1eb4b1c9ae5f535507ed59591bab51e630</id>
<content type='text'>
If schedule is called from an interrupt handler __schedule_bug()
will call show_regs() with the registers saved during the
interrupt handling done in do_IRQ(). This means we'll see the
registers and the backtrace for the process that was interrupted
and not the full backtrace explaining who called schedule().

This is due to 838225b ("sched: use show_regs() to improve
__schedule_bug() output", 2007-10-24) which improperly assumed
that get_irq_regs() would return the registers for the current
stack because it is being called from within an interrupt
handler. Simply remove the show_reg() code so that we dump a
backtrace for the interrupt handler that called schedule().

[ I ran across this when I was presented with a scheduling while
  atomic log with a stacktrace pointing at spin_unlock_irqrestore().
  It made no sense and I had to guess what interrupt handler could
  be called and poke around for someone calling schedule() in an
  interrupt handler. A simple test of putting an msleep() in
  an interrupt handler works better with this patch because you
  can actually see the msleep() call in the backtrace. ]

Also-reported-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Satyam Sharma &lt;satyam@infradead.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1332979847-27102-1-git-send-email-sboyd@codeaurora.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Add #includes needed to permit the removal of asm/system.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=96f951edb1f1bdbbc99b0cd458f9808bb83d58ae'/>
<id>urn:sha1:96f951edb1f1bdbbc99b0cd458f9808bb83d58ae</id>
<content type='text'>
asm/system.h is a cause of circular dependency problems because it contains
commonly used primitive stuff like barrier definitions and uncommonly used
stuff like switch_to() that might require MMU definitions.

asm/system.h has been disintegrated by this point on all arches into the
following common segments:

 (1) asm/barrier.h

     Moved memory barrier definitions here.

 (2) asm/cmpxchg.h

     Moved xchg() and cmpxchg() here.  #included in asm/atomic.h.

 (3) asm/bug.h

     Moved die() and similar here.

 (4) asm/exec.h

     Moved arch_align_stack() here.

 (5) asm/elf.h

     Moved AT_VECTOR_SIZE_ARCH here.

 (6) asm/switch_to.h

     Moved switch_to() here.

Signed-off-by: David Howells &lt;dhowells@redhat.com&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.amat.us/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>
</feed>
