<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/stop_machine.c, branch v2.6.14.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.14.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.14.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2005-06-22T01:46:13Z</updated>
<entry>
<title>[PATCH] smp_processor_id() cleanup</title>
<updated>2005-06-22T01:46:13Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2005-06-22T00:14:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=39c715b71740c4a78ba4769fb54826929bac03cb'/>
<id>urn:sha1:39c715b71740c4a78ba4769fb54826929bac03cb</id>
<content type='text'>
This patch implements a number of smp_processor_id() cleanup ideas that
Arjan van de Ven and I came up with.

The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
spaghetti was hard to follow both on the implementational and on the
usage side.

Some of the complexity arose from picking wrong names, some of the
complexity comes from the fact that not all architectures defined
__smp_processor_id.

In the new code, there are two externally visible symbols:

 - smp_processor_id(): debug variant.

 - raw_smp_processor_id(): nondebug variant. Replaces all existing
   uses of _smp_processor_id() and __smp_processor_id(). Defined
   by every SMP architecture in include/asm-*/smp.h.

There is one new internal symbol, dependent on DEBUG_PREEMPT:

 - debug_smp_processor_id(): internal debug variant, mapped to
                             smp_processor_id().

Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
lib/smp_processor_id.c file.  All related comments got updated and/or
clarified.

I have build/boot tested the following 8 .config combinations on x86:

 {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT.  (Other
architectures are untested, but should work just fine.)

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] use smp_mb/wmb/rmb where possible</title>
<updated>2005-05-01T15:58:47Z</updated>
<author>
<name>akpm@osdl.org</name>
<email>akpm@osdl.org</email>
</author>
<published>2005-05-01T15:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d59dd4620fb8d6422555a9e2b82a707718e68327'/>
<id>urn:sha1:d59dd4620fb8d6422555a9e2b82a707718e68327</id>
<content type='text'>
Replace a number of memory barriers with smp_ variants.  This means we won't
take the unnecessary hit on UP machines.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Missing set_fs() calls around kernel syscall</title>
<updated>2005-03-28T11:58:26Z</updated>
<author>
<name>Randolph Chung</name>
<email>randolph@tausq.org</email>
</author>
<published>2005-03-28T11:58:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4158b4b8ca50e3d02bd82ec47284cbbde0fea434'/>
<id>urn:sha1:4158b4b8ca50e3d02bd82ec47284cbbde0fea434</id>
<content type='text'>
Found by sparse...  since we are passing kernel param to a syscall handler,
we need to do the set_fs() wrappers.

Signed-off-by: Randolph Chung &lt;tausq@debian.org&gt;

Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] remove the BKL by turning it into a semaphore</title>
<updated>2005-01-08T05:59:57Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2005-01-08T05:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fb8f6499abc6a847109d9602b797aa6afd2d5a3d'/>
<id>urn:sha1:fb8f6499abc6a847109d9602b797aa6afd2d5a3d</id>
<content type='text'>
This is the current remove-BKL patch.  I test-booted it on x86 and x64, trying
every conceivable combination of SMP, PREEMPT and PREEMPT_BKL.  All other
architectures should compile as well.  (most of the testing was done with the
zaphod patch undone but it applies cleanly on vanilla -mm3 as well and should
work fine.)

this is the debugging-enabled variant of the patch which has two main
debugging features:

 - debug potentially illegal smp_processor_id() use. Has caught a number
   of real bugs - e.g. look at the printk.c fix in the patch.

 - make it possible to enable/disable the BKL via a .config. If this 
   goes upstream we dont want this of course, but for now it gives
   people a chance to find out whether any particular problem was caused
   by this patch.

This patch has one important fix over the previous BKL patch: on PREEMPT
kernels if we preempted BKL-using code then the code still auto-dropped the
BKL by mistake.  This caused a number of breakages for testers, which
breakages went away once this bug was fixed.

Also the debugging mechanism has been improved alot relative to the previous
BKL patch.

Would be nice to test-drive this in -mm.  There will likely be some more
smp_processor_id() false positives but they are 1) harmless 2) easy to fix up.
We could as well find more real smp_processor_id() related breakages as well.

The most noteworthy fact is that no BKL-using code was found yet that relied
on smp_processor_id(), which is promising from a compatibility POV.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix occasional stop_machine() lockup with &gt; 2 CPUs</title>
<updated>2004-12-01T09:10:19Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2004-12-01T09:10:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a041464f31d6f0ad289c0dfbe8b43cfb1ba3cf43'/>
<id>urn:sha1:a041464f31d6f0ad289c0dfbe8b43cfb1ba3cf43</id>
<content type='text'>
Stephen Rothwell noted a case where one CPU was sitting in userspace, one
in stop_machine() waiting for everyone to enter stopmachine().  This can
happen if migration occurs at exactly the wrong time with more than 2 CPUS.
 Say we have 4 CPUS:

1) stop_machine() on CPU 0creates stopmachine() threads for CPUS 1, 2
   and 3, and yields waiting for them to migrate to their CPUs and
   ack.

2) stopmachine(2) gets rebalanced (probably on exec) to CPU 1.

3) stopmachine(2) calls set_cpus_allowed on CPU 1, sleeps awaiting
   migration thread.

4) stopmachine(1) calls set_cpus_allowed on CPU 0, moves onto CPU1 and
   starts spinning.

Now the migration thread never runs, and we deadlock.  The simplest
solution is for stopmachine() to yield until they are all in place.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] add stop_machine barriers</title>
<updated>2004-04-12T06:19:47Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-04-12T06:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d1e069e24b6da75b8177ca523916309e27cd08e3'/>
<id>urn:sha1:d1e069e24b6da75b8177ca523916309e27cd08e3</id>
<content type='text'>
From: Andrea Arcangeli &lt;andrea@suse.de&gt;

We need a barrier before checking for kthread_should_stop in do_stop.
</content>
</entry>
<entry>
<title>[PATCH] Fix obvious stupid race in do_stop</title>
<updated>2004-03-30T02:49:13Z</updated>
<author>
<name>Srivatsa Vaddagiri</name>
<email>vatsa@in.ibm.com</email>
</author>
<published>2004-03-30T02:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ff1581f7e63be18dd9466705cbeaf4a51f0d0837'/>
<id>urn:sha1:ff1581f7e63be18dd9466705cbeaf4a51f0d0837</id>
<content type='text'>
We don't set the task state to TASK_INTERRUPTIBLE _before_ checking for
kthread_should_stop in do_stop.
</content>
</entry>
<entry>
<title>Make sure to include syscalls.h to get proper prototypes.</title>
<updated>2004-03-09T09:03:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2004-03-09T09:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6689319ea01e54c1bd2c9461dcc439a9701944dc'/>
<id>urn:sha1:6689319ea01e54c1bd2c9461dcc439a9701944dc</id>
<content type='text'>
Especially with REGPARM these things actually matter.
</content>
</entry>
<entry>
<title>[PATCH] stop_machine_run: Move Bogolock Code Out of module.c</title>
<updated>2004-03-08T09:12:45Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2004-03-08T09:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=80037662455b250aa5bd6369d6ad164c3ac97615'/>
<id>urn:sha1:80037662455b250aa5bd6369d6ad164c3ac97615</id>
<content type='text'>
The "bogolock" code was introduced in module.c, as a way of freezing
the machine when we wanted to remove a module.  This patch moves it
out to stop_machine.c and stop_machine.h.

Since the code changes affinity and proirity, it's impolite to hijack
the current context, so we use a kthread.  This means we have to pass
the function rather than implement "stop_machine()" and
"restart_machine()".
</content>
</entry>
</feed>
