<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/kernel/semaphore.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>locking: Move the semaphore core to kernel/locking/</title>
<updated>2013-11-06T06:55:22+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-10-31T17:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e25a64c4017e3a3cda17454b040737e410a12991'/>
<id>e25a64c4017e3a3cda17454b040737e410a12991</id>
<content type='text'>
Suggested-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-vmw5sf6vzmua1z6nx1cg69h2@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-vmw5sf6vzmua1z6nx1cg69h2@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>semaphore: use `bool' type for semaphore_waiter's up</title>
<updated>2013-05-01T00:04:08+00:00</updated>
<author>
<name>liguang</name>
<email>lig.fnst@cn.fujitsu.com</email>
</author>
<published>2013-04-30T22:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=06a6ea3702143e0af38270ac07d102a68810d564'/>
<id>06a6ea3702143e0af38270ac07d102a68810d564</id>
<content type='text'>
Signed-off-by: liguang &lt;lig.fnst@cn.fujitsu.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: liguang &lt;lig.fnst@cn.fujitsu.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>semaphore: use unlikely() for down's timeout</title>
<updated>2013-05-01T00:04:08+00:00</updated>
<author>
<name>liguang</name>
<email>lig.fnst@cn.fujitsu.com</email>
</author>
<published>2013-04-30T22:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c74f66ce102e2cfb61c185f7451538e29de640b9'/>
<id>c74f66ce102e2cfb61c185f7451538e29de640b9</id>
<content type='text'>
Signed-off-by: liguang &lt;lig.fnst@cn.fujitsu.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: liguang &lt;lig.fnst@cn.fujitsu.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>semaphore: fix improper comment reference to mutex</title>
<updated>2012-04-06T00:15:55+00:00</updated>
<author>
<name>Lucia Rosculete</name>
<email>luciarosculete@gmail.com</email>
</author>
<published>2012-03-03T14:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f7232f0808d9c9899cbecf79296b0293217a27cd'/>
<id>f7232f0808d9c9899cbecf79296b0293217a27cd</id>
<content type='text'>
Replace "mutex" with "semaphore" in down_trylock comment

Signed-off-by: Lucia Rosculete &lt;luciarosculete@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace "mutex" with "semaphore" in down_trylock comment

Signed-off-by: Lucia Rosculete &lt;luciarosculete@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Map most files to use export.h instead of module.h</title>
<updated>2011-10-31T13:20:12+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-23T18:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9984de1a5a8a96275fcab818f7419af5a3c86e71'/>
<id>9984de1a5a8a96275fcab818f7419af5a3c86e71</id>
<content type='text'>
The changed files were only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
onto the isolated export header for faster compile times.

Nothing to see here but a whole lot of instances of:

  -#include &lt;linux/module.h&gt;
  +#include &lt;linux/export.h&gt;

This commit is only changing the kernel dir; next targets
will probably be mm, fs, the arch dirs, etc.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changed files were only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
onto the isolated export header for faster compile times.

Nothing to see here but a whole lot of instances of:

  -#include &lt;linux/module.h&gt;
  +#include &lt;linux/export.h&gt;

This commit is only changing the kernel dir; next targets
will probably be mm, fs, the arch dirs, etc.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locking, semaphores: Annotate inner lock as raw</title>
<updated>2011-09-13T09:11:57+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-02-24T08:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8292c9e15c3b069459794a04f5e2cf0d5665ddc4'/>
<id>8292c9e15c3b069459794a04f5e2cf0d5665ddc4</id>
<content type='text'>
There is no reason to have the spin_lock protecting the semaphore
preemptible on -rt. Annotate it as a raw_spinlock.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

( On rt this also solves lockdep complaining about the
  rt_mutex.wait_lock being not initialized. )

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no reason to have the spin_lock protecting the semaphore
preemptible on -rt. Annotate it as a raw_spinlock.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

( On rt this also solves lockdep complaining about the
  rt_mutex.wait_lock being not initialized. )

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>semaphore: __down_common: use signal_pending_state()</title>
<updated>2008-08-05T21:33:47+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-08-05T20:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5b2becc8cffdccdd60c63099f592ddd35aa6c34f'/>
<id>5b2becc8cffdccdd60c63099f592ddd35aa6c34f</id>
<content type='text'>
Change __down_common() to use signal_pending_state() instead of open
coding.

The changes in kernel/semaphore.o are just artifacts, the state checks are
optimized away.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Roland McGrath &lt;roland@redhat.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change __down_common() to use signal_pending_state() instead of open
coding.

The changes in kernel/semaphore.o are just artifacts, the state checks are
optimized away.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmiotrace broken in linux-next (8-bit writes only)</title>
<updated>2008-07-01T08:14:06+00:00</updated>
<author>
<name>Pekka Paalanen</name>
<email>pq@iki.fi</email>
</author>
<published>2008-06-30T20:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3e61e0c976532a542b23bbb74c8f631815171078'/>
<id>3e61e0c976532a542b23bbb74c8f631815171078</id>
<content type='text'>
The moment mmiotrace is enabled, I hit a NULL deref in:

IP: [&lt;ffffffff80256e71&gt;] __trace_special+0x17c/0x23a
Call Trace:
 [&lt;ffffffff802573cc&gt;] ftrace_special+0x6f/0x9a
 [&lt;ffffffff8023e3e4&gt;] down+0x19/0x4a
 [&lt;ffffffff80228adc&gt;] acquire_console_sem+0x42/0x58
 [&lt;ffffffff8035d273&gt;] con_flush_chars+0x28/0x43
 [&lt;ffffffff80354a70&gt;] write_chan+0x22e/0x334
 [&lt;ffffffff802244e9&gt;] ? default_wake_function+0x0/0xf
 [&lt;ffffffff8035236d&gt;] tty_write+0x195/0x228
 [&lt;ffffffff80354842&gt;] ? write_chan+0x0/0x334
 [&lt;ffffffff8027c23a&gt;] vfs_write+0xae/0x137
 [&lt;ffffffff8027c6e3&gt;] sys_write+0x47/0x70
 [&lt;ffffffff8020b1db&gt;] system_call_after_swapgs+0x7b/0x80

which means 'entry' in __trace_special() is NULL.

[ mingo@elte.hu: that ftrace_special() was a leftover. ]

Signed-off-by: Pekka Paalanen &lt;pq@iki.fi&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
Cc: proski@gnu.org
Cc: "Vegard Nossum" &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The moment mmiotrace is enabled, I hit a NULL deref in:

IP: [&lt;ffffffff80256e71&gt;] __trace_special+0x17c/0x23a
Call Trace:
 [&lt;ffffffff802573cc&gt;] ftrace_special+0x6f/0x9a
 [&lt;ffffffff8023e3e4&gt;] down+0x19/0x4a
 [&lt;ffffffff80228adc&gt;] acquire_console_sem+0x42/0x58
 [&lt;ffffffff8035d273&gt;] con_flush_chars+0x28/0x43
 [&lt;ffffffff80354a70&gt;] write_chan+0x22e/0x334
 [&lt;ffffffff802244e9&gt;] ? default_wake_function+0x0/0xf
 [&lt;ffffffff8035236d&gt;] tty_write+0x195/0x228
 [&lt;ffffffff80354842&gt;] ? write_chan+0x0/0x334
 [&lt;ffffffff8027c23a&gt;] vfs_write+0xae/0x137
 [&lt;ffffffff8027c6e3&gt;] sys_write+0x47/0x70
 [&lt;ffffffff8020b1db&gt;] system_call_after_swapgs+0x7b/0x80

which means 'entry' in __trace_special() is NULL.

[ mingo@elte.hu: that ftrace_special() was a leftover. ]

Signed-off-by: Pekka Paalanen &lt;pq@iki.fi&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
Cc: proski@gnu.org
Cc: "Vegard Nossum" &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ftrace: stacktrace fix</title>
<updated>2008-05-23T20:34:56+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-05-12T19:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=74f4e369fc5b52433ad824cef32d3bf1304549be'/>
<id>74f4e369fc5b52433ad824cef32d3bf1304549be</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "semaphore: fix"</title>
<updated>2008-05-11T03:43:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-05-11T03:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=00b41ec2611dc98f87f30753ee00a53db648d662'/>
<id>00b41ec2611dc98f87f30753ee00a53db648d662</id>
<content type='text'>
This reverts commit bf726eab3711cf192405d21688a4b21e07b6188a, as it has
been reported to cause a regression with processes stuck in __down(),
apparently because some missing wakeup.

Quoth Sven Wegener:
 "I'm currently investigating a regression that has showed up with my
  last git pull yesterday.  Bisecting the commits showed bf726e
  "semaphore: fix" to be the culprit, reverting it fixed the issue.

  Symptoms: During heavy filesystem usage (e.g.  a kernel compile) I get
  several compiler processes in uninterruptible sleep, blocking all i/o
  on the filesystem.  System is an Intel Core 2 Quad running a 64bit
  kernel and userspace.  Filesystem is xfs on top of lvm.  See below for
  the output of sysrq-w."

See

	http://lkml.org/lkml/2008/5/10/45

for full report.

In the meantime, we can just fix the BKL performance regression by
reverting back to the good old BKL spinlock implementation instead,
since any sleeping lock will generally perform badly, especially if it
tries to be fair.

Reported-by: Sven Wegener &lt;sven.wegener@stealer.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit bf726eab3711cf192405d21688a4b21e07b6188a, as it has
been reported to cause a regression with processes stuck in __down(),
apparently because some missing wakeup.

Quoth Sven Wegener:
 "I'm currently investigating a regression that has showed up with my
  last git pull yesterday.  Bisecting the commits showed bf726e
  "semaphore: fix" to be the culprit, reverting it fixed the issue.

  Symptoms: During heavy filesystem usage (e.g.  a kernel compile) I get
  several compiler processes in uninterruptible sleep, blocking all i/o
  on the filesystem.  System is an Intel Core 2 Quad running a 64bit
  kernel and userspace.  Filesystem is xfs on top of lvm.  See below for
  the output of sysrq-w."

See

	http://lkml.org/lkml/2008/5/10/45

for full report.

In the meantime, we can just fix the BKL performance regression by
reverting back to the good old BKL spinlock implementation instead,
since any sleeping lock will generally perform badly, especially if it
tries to be fair.

Reported-by: Sven Wegener &lt;sven.wegener@stealer.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
