<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched/core.c, branch v3.7-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/sched/core.c?h=v3.7-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/sched/core.c?h=v3.7-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-12T13:13:05Z</updated>
<entry>
<title>Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-10-12T13:13:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-12T13:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0588f1f934791b79d0a1e9b327be9b6eb361d2b8'/>
<id>urn:sha1:0588f1f934791b79d0a1e9b327be9b6eb361d2b8</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar:
 "A CPU hotplug related crash fix and a nohz accounting fixlet."

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Update sched_domains_numa_masks[][] when new cpus are onlined
  sched: Ensure 'sched_domains_numa_levels' is safe to use in other functions
  nohz: Fix one jiffy count too far in idle cputime
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal</title>
<updated>2012-10-12T01:49:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-12T01:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8213a2f3eeafdecf06dd718cb4130372263f6067'/>
<id>urn:sha1:8213a2f3eeafdecf06dd718cb4130372263f6067</id>
<content type='text'>
Pull pile 2 of execve and kernel_thread unification work from Al Viro:
 "Stuff in there: kernel_thread/kernel_execve/sys_execve conversions for
  several more architectures plus assorted signal fixes and cleanups.

  There'll be more (in particular, real fixes for the alpha
  do_notify_resume() irq mess)..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (43 commits)
  alpha: don't open-code trace_report_syscall_{enter,exit}
  Uninclude linux/freezer.h
  m32r: trim masks
  avr32: trim masks
  tile: don't bother with SIGTRAP in setup_frame
  microblaze: don't bother with SIGTRAP in setup_rt_frame()
  mn10300: don't bother with SIGTRAP in setup_frame()
  frv: no need to raise SIGTRAP in setup_frame()
  x86: get rid of duplicate code in case of CONFIG_VM86
  unicore32: remove pointless test
  h8300: trim _TIF_WORK_MASK
  parisc: decide whether to go to slow path (tracesys) based on thread flags
  parisc: don't bother looping in do_signal()
  parisc: fix double restarts
  bury the rest of TIF_IRET
  sanitize tsk_is_polling()
  bury _TIF_RESTORE_SIGMASK
  unicore32: unobfuscate _TIF_WORK_MASK
  mips: NOTIFY_RESUME is not needed in TIF masks
  mips: merge the identical "return from syscall" per-ABI code
  ...

Conflicts:
	arch/arm/include/asm/thread_info.h
</content>
</entry>
<entry>
<title>sched: Update sched_domains_numa_masks[][] when new cpus are onlined</title>
<updated>2012-10-05T11:54:48Z</updated>
<author>
<name>Tang Chen</name>
<email>tangchen@cn.fujitsu.com</email>
</author>
<published>2012-09-25T13:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=301a5cba2887d1f640e6d5184b05a6d7132017d5'/>
<id>urn:sha1:301a5cba2887d1f640e6d5184b05a6d7132017d5</id>
<content type='text'>
Once array sched_domains_numa_masks[] []is defined, it is never updated.

When a new cpu on a new node is onlined, the coincident member in
sched_domains_numa_masks[][] is not initialized, and all the masks are 0.
As a result, the build_overlap_sched_groups() will initialize a NULL
sched_group for the new cpu on the new node, which will lead to kernel panic:

[ 3189.403280] Call Trace:
[ 3189.403286]  [&lt;ffffffff8106c36f&gt;] warn_slowpath_common+0x7f/0xc0
[ 3189.403289]  [&lt;ffffffff8106c3ca&gt;] warn_slowpath_null+0x1a/0x20
[ 3189.403292]  [&lt;ffffffff810b1d57&gt;] build_sched_domains+0x467/0x470
[ 3189.403296]  [&lt;ffffffff810b2067&gt;] partition_sched_domains+0x307/0x510
[ 3189.403299]  [&lt;ffffffff810b1ea2&gt;] ? partition_sched_domains+0x142/0x510
[ 3189.403305]  [&lt;ffffffff810fcc93&gt;] cpuset_update_active_cpus+0x83/0x90
[ 3189.403308]  [&lt;ffffffff810b22a8&gt;] cpuset_cpu_active+0x38/0x70
[ 3189.403316]  [&lt;ffffffff81674b87&gt;] notifier_call_chain+0x67/0x150
[ 3189.403320]  [&lt;ffffffff81664647&gt;] ? native_cpu_up+0x18a/0x1b5
[ 3189.403328]  [&lt;ffffffff810a044e&gt;] __raw_notifier_call_chain+0xe/0x10
[ 3189.403333]  [&lt;ffffffff81070470&gt;] __cpu_notify+0x20/0x40
[ 3189.403337]  [&lt;ffffffff8166663e&gt;] _cpu_up+0xe9/0x131
[ 3189.403340]  [&lt;ffffffff81666761&gt;] cpu_up+0xdb/0xee
[ 3189.403348]  [&lt;ffffffff8165667c&gt;] store_online+0x9c/0xd0
[ 3189.403355]  [&lt;ffffffff81437640&gt;] dev_attr_store+0x20/0x30
[ 3189.403361]  [&lt;ffffffff8124aa63&gt;] sysfs_write_file+0xa3/0x100
[ 3189.403368]  [&lt;ffffffff811ccbe0&gt;] vfs_write+0xd0/0x1a0
[ 3189.403371]  [&lt;ffffffff811ccdb4&gt;] sys_write+0x54/0xa0
[ 3189.403375]  [&lt;ffffffff81679c69&gt;] system_call_fastpath+0x16/0x1b
[ 3189.403377] ---[ end trace 1e6cf85d0859c941 ]---
[ 3189.403398] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018

This patch registers a new notifier for cpu hotplug notify chain, and
updates sched_domains_numa_masks every time a new cpu is onlined or offlined.

Signed-off-by: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
[ fixed compile warning ]
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1348578751-16904-3-git-send-email-tangchen@cn.fujitsu.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Ensure 'sched_domains_numa_levels' is safe to use in other functions</title>
<updated>2012-10-05T11:54:46Z</updated>
<author>
<name>Tang Chen</name>
<email>tangchen@cn.fujitsu.com</email>
</author>
<published>2012-09-25T13:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f7865f3e44db4c73fdc454fb2af40806212a7ca'/>
<id>urn:sha1:5f7865f3e44db4c73fdc454fb2af40806212a7ca</id>
<content type='text'>
We should temporarily reset 'sched_domains_numa_levels' to 0 after
it is reset to 'level' in sched_init_numa(). If it fails to allocate
memory for array sched_domains_numa_masks[][], the array will contain
less then 'level' members. This could be dangerous when we use it to
iterate array sched_domains_numa_masks[][] in other functions.

This patch set sched_domains_numa_levels to 0 before initializing
array sched_domains_numa_masks[][], and reset it to 'level' when
sched_domains_numa_masks[][] is fully initialized.

Signed-off-by: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1348578751-16904-2-git-send-email-tangchen@cn.fujitsu.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-10-01T17:43:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-01T17:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0b981cb94bc63a2d0e5eccccdca75fe57643ffce'/>
<id>urn:sha1:0b981cb94bc63a2d0e5eccccdca75fe57643ffce</id>
<content type='text'>
Pull scheduler changes from Ingo Molnar:
 "Continued quest to clean up and enhance the cputime code by Frederic
  Weisbecker, in preparation for future tickless kernel features.

  Other than that, smallish changes."

Fix up trivial conflicts due to additions next to each other in arch/{x86/}Kconfig

* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
  cputime: Make finegrained irqtime accounting generally available
  cputime: Gather time/stats accounting config options into a single menu
  ia64: Reuse system and user vtime accounting functions on task switch
  ia64: Consolidate user vtime accounting
  vtime: Consolidate system/idle context detection
  cputime: Use a proper subsystem naming for vtime related APIs
  sched: cpu_power: enable ARCH_POWER
  sched/nohz: Clean up select_nohz_load_balancer()
  sched: Fix load avg vs. cpu-hotplug
  sched: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW
  sched: Fix nohz_idle_balance()
  sched: Remove useless code in yield_to()
  sched: Add time unit suffix to sched sysctl knobs
  sched/debug: Limit sd-&gt;*_idx range on sysctl
  sched: Remove AFFINE_WAKEUPS feature flag
  s390: Remove leftover account_tick_vtime() header
  cputime: Consolidate vtime handling on context switch
  sched: Move cputime code to its own file
  cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING
  tile: Remove SD_PREFER_LOCAL leftover
  ...
</content>
</entry>
<entry>
<title>sanitize tsk_is_polling()</title>
<updated>2012-10-01T13:58:13Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-01T18:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16a8016372c42c7628eb4a39d75386a461e8c5d0'/>
<id>urn:sha1:16a8016372c42c7628eb4a39d75386a461e8c5d0</id>
<content type='text'>
Make default just return 0.  The current default (checking
TIF_POLLING_NRFLAG) is taken to architectures that need it;
ones that don't do polling in their idle threads don't need
to defined TIF_POLLING_NRFLAG at all.

ia64 defined both TS_POLLING (used by its tsk_is_polling())
and TIF_POLLING_NRFLAG (not used at all).  Killed the latter...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>rcu: Exit RCU extended QS on user preemption</title>
<updated>2012-09-26T13:47:11Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2012-07-11T18:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20ab65e33f469c35f3dabde3445b668aa9c943ee'/>
<id>urn:sha1:20ab65e33f469c35f3dabde3445b668aa9c943ee</id>
<content type='text'>
When exceptions or irq are about to resume userspace, if
the task needs to be rescheduled, the arch low level code
calls schedule() directly.

If we call it, it is because we have the TIF_RESCHED flag:

- It can be set after random local calls to set_need_resched()
(RCU, drm, ...)

- A wake up happened and the CPU needs preemption. This can
  happen in several ways:

    * Remotely: the remote waking CPU has set TIF_RESCHED and send the
      wakee an IPI to schedule the new task.
    * Remotely enqueued: the remote waking CPU sends an IPI to the target
      and the wake up is made by the target.
    * Locally: waking CPU == wakee CPU and the wakeup is done locally.
      set_need_resched() is called without IPI.

In the case of local and remotely enqueued wake ups, the tick can
be restarted when we enqueue the new task and RCU can exit the
extended quiescent state at the same time. Then by the time we reach
irq exit path and we call schedule, we are not in RCU user mode.

But if we call schedule() only because something called set_need_resched(),
RCU may still be in user mode when we reach schedule.

Also if a wake up is done remotely, the CPU might see the TIF_RESCHED
flag and call schedule while the IPI has not yet happen to restart the
tick and exit RCU user mode.

We need to manually protect against these corner cases.

Create a new API schedule_user() that calls schedule() inside
rcu_user_exit()-rcu_user_enter() in order to protect it. Archs
will need to rely on it now to implement user preemption safely.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Geoff Levand &lt;geoff@infradead.org&gt;
Cc: Gilad Ben Yossef &lt;gilad@benyossef.com&gt;
Cc: Hakan Akkan &lt;hakanakkan@gmail.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Kevin Hilman &lt;khilman@ti.com&gt;
Cc: Max Krasnyansky &lt;maxk@qualcomm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Sven-Thorsten Dietrich &lt;thebigcorporation@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>rcu: Exit RCU extended QS on kernel preemption after irq/exception</title>
<updated>2012-09-26T13:47:09Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2012-07-11T18:26:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90a340ed53f0f3bcc3fdf1b2cff56c0e4e911d01'/>
<id>urn:sha1:90a340ed53f0f3bcc3fdf1b2cff56c0e4e911d01</id>
<content type='text'>
When an exception or an irq exits, and we are going to resume into
interrupted kernel code, the low level architecture code calls
preempt_schedule_irq() if there is a need to reschedule.

If the interrupt/exception occured between a call to rcu_user_enter()
(from syscall exit, exception exit, do_notify_resume exit, ...) and
a real resume to userspace (iret,...), preempt_schedule_irq() can be
called whereas RCU thinks we are in userspace. But preempt_schedule_irq()
is going to run kernel code and may be some RCU read side critical
section. We must exit the userspace extended quiescent state before
we call it.

To solve this, just call rcu_user_exit() in the beginning of
preempt_schedule_irq().

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Geoff Levand &lt;geoff@infradead.org&gt;
Cc: Gilad Ben Yossef &lt;gilad@benyossef.com&gt;
Cc: Hakan Akkan &lt;hakanakkan@gmail.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Kevin Hilman &lt;khilman@ti.com&gt;
Cc: Max Krasnyansky &lt;maxk@qualcomm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Sven-Thorsten Dietrich &lt;thebigcorporation@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>rcu: Switch task's syscall hooks on context switch</title>
<updated>2012-09-26T13:47:02Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2012-07-16T22:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=04e7e951532b390b16feb070be9972b8fad2fc57'/>
<id>urn:sha1:04e7e951532b390b16feb070be9972b8fad2fc57</id>
<content type='text'>
Clear the syscalls hook of a task when it's scheduled out so that if
the task migrates, it doesn't run the syscall slow path on a CPU
that might not need it.

Also set the syscalls hook on the next task if needed.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Geoff Levand &lt;geoff@infradead.org&gt;
Cc: Gilad Ben Yossef &lt;gilad@benyossef.com&gt;
Cc: Hakan Akkan &lt;hakanakkan@gmail.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Kevin Hilman &lt;khilman@ti.com&gt;
Cc: Max Krasnyansky &lt;maxk@qualcomm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Sven-Thorsten Dietrich &lt;thebigcorporation@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'tip/core/rcu' into next.2012.09.25b</title>
<updated>2012-09-25T17:03:56Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2012-09-25T17:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=593d1006cdf710ab3469c0c37c184fea0bc3da97'/>
<id>urn:sha1:593d1006cdf710ab3469c0c37c184fea0bc3da97</id>
<content type='text'>
Resolved conflict in kernel/sched/core.c using Peter Zijlstra's
approach from https://lkml.org/lkml/2012/9/5/585.
</content>
</entry>
</feed>
