<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/softlockup.c, branch v2.6.24</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.24</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.24'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2007-10-19T18:53:43Z</updated>
<entry>
<title>Use helpers to obtain task pid in printks</title>
<updated>2007-10-19T18:53:43Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2007-10-19T06:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed'/>
<id>urn:sha1:ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed</id>
<content type='text'>
The task_struct-&gt;pid member is going to be deprecated, so start
using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
the kernel.

The first thing to start with is the pid, printed to dmesg - in
this case we may safely use task_pid_nr(). Besides, printks produce
more (much more) than a half of all the explicit pid usage.

[akpm@linux-foundation.org: git-drm went and changed lots of stuff]
Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>softlockup: add a /proc tuning parameter</title>
<updated>2007-10-17T15:42:47Z</updated>
<author>
<name>Ravikiran G Thirumalai</name>
<email>kiran@scalex86.org</email>
</author>
<published>2007-10-17T06:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4f3b63fe15b4629aa1ec163c95ab30423d0f76a'/>
<id>urn:sha1:c4f3b63fe15b4629aa1ec163c95ab30423d0f76a</id>
<content type='text'>
Control the trigger limit for softlockup warnings.  This is useful for
debugging softlockups, by lowering the softlockup_thresh to identify
possible softlockups earlier.

This patch:
1. Adds a sysctl softlockup_thresh with valid values of 1-60s
   (Higher value to disable false positives)
2. Changes the softlockup printk to print the cpu softlockup time

[akpm@linux-foundation.org: Fix various warnings and add definition of "two"]
Signed-off-by: Ravikiran Thirumalai &lt;kiran@scalex86.org&gt;
Signed-off-by: Shai Fultheim &lt;shai@scalex86.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>softlockup watchdog: style cleanups</title>
<updated>2007-10-17T15:42:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-10-17T06:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5f2ce3c6024a5bb895647b6bd88ecae5001020a'/>
<id>urn:sha1:a5f2ce3c6024a5bb895647b6bd88ecae5001020a</id>
<content type='text'>
kernel/softirq.c grew a few style uncleanlinesses in the past few
months, clean that up. No functional changes:

   text    data     bss     dec     hex filename
   1126      76       4    1206     4b6 softlockup.o.before
   1129      76       4    1209     4b9 softlockup.o.after

( the 3 bytes .text increase is due to the "&lt;1&gt;" appended to one of
  the printk messages. )

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>softlockup: improve debug output</title>
<updated>2007-10-17T15:42:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-10-17T06:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43581a10075492445f65234384210492ff333eba'/>
<id>urn:sha1:43581a10075492445f65234384210492ff333eba</id>
<content type='text'>
Improve the debuggability of kernel lockups by enhancing the debug
output of the softlockup detector: print the task that causes the lockup
and try to print a more intelligent backtrace.

The old format was:

  BUG: soft lockup detected on CPU#1!
   [&lt;c0105e4a&gt;] show_trace_log_lvl+0x19/0x2e
   [&lt;c0105f43&gt;] show_trace+0x12/0x14
   [&lt;c0105f59&gt;] dump_stack+0x14/0x16
   [&lt;c015f6bc&gt;] softlockup_tick+0xbe/0xd0
   [&lt;c013457d&gt;] run_local_timers+0x12/0x14
   [&lt;c01346b8&gt;] update_process_times+0x3e/0x63
   [&lt;c0145fb8&gt;] tick_sched_timer+0x7c/0xc0
   [&lt;c0140a75&gt;] hrtimer_interrupt+0x135/0x1ba
   [&lt;c011bde7&gt;] smp_apic_timer_interrupt+0x6e/0x80
   [&lt;c0105aa3&gt;] apic_timer_interrupt+0x33/0x38
   [&lt;c0104f8a&gt;] syscall_call+0x7/0xb
   =======================

The new format is:

  BUG: soft lockup detected on CPU#1! [prctl:2363]

  Pid: 2363, comm:                prctl
  EIP: 0060:[&lt;c013915f&gt;] CPU: 1
  EIP is at sys_prctl+0x24/0x18c
   EFLAGS: 00000213    Not tainted  (2.6.22-cfs-v20 #26)
  EAX: 00000001 EBX: 000003e7 ECX: 00000001 EDX: f6df0000
  ESI: 000003e7 EDI: 000003e7 EBP: f6df0fb0 DS: 007b ES: 007b FS: 00d8
  CR0: 8005003b CR2: 4d8c3340 CR3: 3731d000 CR4: 000006d0
   [&lt;c0105e4a&gt;] show_trace_log_lvl+0x19/0x2e
   [&lt;c0105f43&gt;] show_trace+0x12/0x14
   [&lt;c01040be&gt;] show_regs+0x1ab/0x1b3
   [&lt;c015f807&gt;] softlockup_tick+0xef/0x108
   [&lt;c013457d&gt;] run_local_timers+0x12/0x14
   [&lt;c01346b8&gt;] update_process_times+0x3e/0x63
   [&lt;c0145fcc&gt;] tick_sched_timer+0x7c/0xc0
   [&lt;c0140a89&gt;] hrtimer_interrupt+0x135/0x1ba
   [&lt;c011bde7&gt;] smp_apic_timer_interrupt+0x6e/0x80
   [&lt;c0105aa3&gt;] apic_timer_interrupt+0x33/0x38
   [&lt;c0104f8a&gt;] syscall_call+0x7/0xb
   =======================

Note that in the old format we only knew that some system call locked
up, we didnt know _which_. With the new format we know that it's at a
specific place in sys_prctl(). [which was where i created an artificial
kernel lockup to test the new format.]

This is also useful if the lockup happens in user-space - the user-space
EIP (and other registers) will be printed too. (such a lockup would
either suggest that the task was running at SCHED_FIFO:99 and looping
for more than 10 seconds, or that the softlockup detector has a
false-positive.)

The task name is printed too first, just in case we dont manage to print
a useful backtrace.

[satyam@infradead.org: fix warning]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Satyam Sharma &lt;satyam@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fix the softlockup watchdog to actually work</title>
<updated>2007-10-17T15:42:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-10-17T06:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a115d5caca1a2905ba7a32b408a6042b20179aaa'/>
<id>urn:sha1:a115d5caca1a2905ba7a32b408a6042b20179aaa</id>
<content type='text'>
this Xen related commit:

   commit 966812dc98e6a7fcdf759cbfa0efab77500a8868
   Author: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
   Date:   Tue May 8 00:28:02 2007 -0700

       Ignore stolen time in the softlockup watchdog

broke the softlockup watchdog to never report any lockups. (!)

print_timestamp defaults to 0, this makes the following condition
always true:

	if (print_timestamp &lt; (touch_timestamp + 1) ||

and we'll in essence never report soft lockups.

apparently the functionality of the soft lockup watchdog was never
actually tested with that patch applied ...

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>softlockup: use cpu_clock() instead of sched_clock()</title>
<updated>2007-10-17T15:42:46Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-10-17T06:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3b13c23f186ecb57204580cc1f2dbe9c284953a'/>
<id>urn:sha1:a3b13c23f186ecb57204580cc1f2dbe9c284953a</id>
<content type='text'>
sched_clock() is not a reliable time-source, use cpu_clock() instead.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Freezer: make kernel threads nonfreezable by default</title>
<updated>2007-07-17T17:23:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-07-17T11:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=831441862956fffa17b9801db37e6ea1650b0f69'/>
<id>urn:sha1:831441862956fffa17b9801db37e6ea1650b0f69</id>
<content type='text'>
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves.  This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.

It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.

The patch causes all kernel threads to be nonfreezable by default (ie.  to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE.  It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear.  Additionally, it updates documentation to
describe the freezing of tasks more accurately.

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Add suspend-related notifications for CPU hotplug</title>
<updated>2007-05-09T19:30:56Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-05-09T09:35:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d'/>
<id>urn:sha1:8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d</id>
<content type='text'>
Since nonboot CPUs are now disabled after tasks and devices have been
frozen and the CPU hotplug infrastructure is used for this purpose, we need
special CPU hotplug notifications that will help the CPU-hotplug-aware
subsystems distinguish normal CPU hotplug events from CPU hotplug events
related to a system-wide suspend or resume operation in progress.  This
patch introduces such notifications and causes them to be used during
suspend and resume transitions.  It also changes all of the
CPU-hotplug-aware subsystems to take these notifications into consideration
(for now they are handled in the same way as the corresponding "normal"
ones).

[oleg@tv-sign.ru: cleanups]
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>add touch_all_softlockup_watchdogs()</title>
<updated>2007-05-08T18:15:06Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2007-05-08T07:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04c9167f91e309c9c4ea982992aa08e83b2eb42e'/>
<id>urn:sha1:04c9167f91e309c9c4ea982992aa08e83b2eb42e</id>
<content type='text'>
Add touch_all_softlockup_watchdogs() to allow the softlockup watchdog
timers on all cpus to be updated.  This is used to prevent sysrq-t from
generating a spurious watchdog message when generating lots of output.

Softlockup watchdogs use sched_clock() as its timebase, which is inherently
per-cpu (at least, when it is measuring unstolen time).  Because of this,
it isn't possible for one CPU to directly update the other CPU's timers,
but it is possible to tell the other CPUs to do update themselves
appropriately.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Acked-by: Chris Lalancette &lt;clalance@redhat.com&gt;
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Rick Lindsley &lt;ricklind@us.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Ignore stolen time in the softlockup watchdog</title>
<updated>2007-05-08T18:15:06Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2007-05-08T07:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=966812dc98e6a7fcdf759cbfa0efab77500a8868'/>
<id>urn:sha1:966812dc98e6a7fcdf759cbfa0efab77500a8868</id>
<content type='text'>
The softlockup watchdog is currently a nuisance in a virtual machine, since
the whole system could have the CPU stolen from it for a long period of
time.  While it would be unlikely for a guest domain to be denied timer
interrupts for over 10s, it could happen and any softlockup message would
be completely spurious.

Earlier I proposed that sched_clock() return time in unstolen nanoseconds,
which is how Xen and VMI currently implement it.  If the softlockup
watchdog uses sched_clock() to measure time, it would automatically ignore
stolen time, and therefore only report when the guest itself locked up.
When running native, sched_clock() returns real-time nanoseconds, so the
behaviour would be unchanged.

Note that sched_clock() used this way is inherently per-cpu, so this patch
makes sure that the per-processor watchdog thread initialized its own
timestamp.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Cc: Zachary Amsden &lt;zach@vmware.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Dan Hecht &lt;dhecht@vmware.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Chris Lalancette &lt;clalance@redhat.com&gt;
Cc: Rick Lindsley &lt;ricklind@us.ibm.com&gt;
Cc: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
