Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <teheo@suse.de>2010-03-11 00:55:09 (GMT)
committer Tejun Heo <teheo@suse.de>2010-03-11 00:55:09 (GMT)
commit39eac1e710e6c9c8a524ad9a6319a3426e872894 (patch)
tree653e3fbefd8e5ab9e4f89ca98c78194531f3177b
parentf379944d65a9ad3612cc4a0ed131524aade3c999 (diff)
- patches.suse/stop_machine-implement-lazy: stop_machine:
implement stop_machine.lazy kernel parameter (bnc#586417).
-rw-r--r--kernel-source.changes6
-rw-r--r--patches.suse/stop_machine-implement-lazy81
-rw-r--r--series.conf1
3 files changed, 88 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 4a95aed..7d9d263 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 11 01:55:02 CET 2010 - teheo@suse.de
+
+- patches.suse/stop_machine-implement-lazy: stop_machine:
+ implement stop_machine.lazy kernel parameter (bnc#586417).
+
+-------------------------------------------------------------------
Wed Mar 10 20:02:46 CET 2010 - jeffm@suse.de
- patches.suse/kdb-x86-backtrace-code-to-use-the-in-kernel-show_stack-function:
diff --git a/patches.suse/stop_machine-implement-lazy b/patches.suse/stop_machine-implement-lazy
new file mode 100644
index 0000000..4083fd1
--- /dev/null
+++ b/patches.suse/stop_machine-implement-lazy
@@ -0,0 +1,81 @@
+From: Tejun Heo <teheo@suse.de>
+Subject: stop_machine: implement stop_machine.lazy kernel parameter
+References: bnc#586417
+Patch-Mainline: temp workaround for SLE11, mainline will have different solution
+
+Repeated creating and destroying stopmachine threads slow down booting
+significantly on very large machines. Implement stop_machine.lazy
+parameter which makes stop_machine keep the threads once created. SGI
+reports that this significantly speeds up booting on UV 1024cpu
+systems.
+
+Signed-off-by: Tejun Heo <teheo@suse.de>
+Cc: Dimitri Sivanich <sivanich@sgi.com>
+---
+ Documentation/kernel-parameters.txt | 7 +++++++
+ kernel/stop_machine.c | 13 +++++++++++--
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+Index: linux-2.6.32-SLE11-SP1/kernel/stop_machine.c
+===================================================================
+--- linux-2.6.32-SLE11-SP1.orig/kernel/stop_machine.c
++++ linux-2.6.32-SLE11-SP1/kernel/stop_machine.c
+@@ -5,6 +5,7 @@
+ #include <linux/err.h>
+ #include <linux/kthread.h>
+ #include <linux/module.h>
++#include <linux/moduleparam.h>
+ #include <linux/sched.h>
+ #include <linux/stop_machine.h>
+ #include <linux/syscalls.h>
+@@ -47,6 +48,10 @@ static struct stop_machine_data active,
+ static const struct cpumask *active_cpus;
+ static void *stop_machine_work;
+
++static int stop_machine_lazy;
++module_param_named(lazy, stop_machine_lazy, int, 0444);
++MODULE_PARM_DESC(lazy, "stop machine lazy mode, avoid creating and destroying threads repeatedly (0=off [default], 1=on)");
++
+ static void set_state(enum stopmachine_state newstate)
+ {
+ /* Reset ack counter. */
+@@ -124,7 +129,10 @@ int stop_machine_create(void)
+ if (!stop_machine_work)
+ goto err_out;
+ done:
+- refcount++;
++ if (stop_machine_lazy)
++ refcount = 1;
++ else
++ refcount++;
+ mutex_unlock(&setup_lock);
+ return 0;
+
+@@ -139,7 +147,8 @@ EXPORT_SYMBOL_GPL(stop_machine_create);
+ void stop_machine_destroy(void)
+ {
+ mutex_lock(&setup_lock);
+- refcount--;
++ if (!stop_machine_lazy)
++ refcount--;
+ if (refcount)
+ goto done;
+ destroy_workqueue(stop_machine_wq);
+Index: linux-2.6.32-SLE11-SP1/Documentation/kernel-parameters.txt
+===================================================================
+--- linux-2.6.32-SLE11-SP1.orig/Documentation/kernel-parameters.txt
++++ linux-2.6.32-SLE11-SP1/Documentation/kernel-parameters.txt
+@@ -2503,6 +2503,13 @@ and is between 256 and 4096 characters.
+ stifb= [HW]
+ Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]]
+
++ stop_machine.lazy=
++ [KNL,BOOT]
++ Stop machine lazy mode. Avoid creating and destroying
++ stop_machine threads repeatedly.
++ 0 = off [default]
++ 1 = on
++
+ sunrpc.min_resvport=
+ sunrpc.max_resvport=
+ [NFS,SUNRPC]
diff --git a/series.conf b/series.conf
index c65f999..7660fa4 100644
--- a/series.conf
+++ b/series.conf
@@ -601,6 +601,7 @@
patches.fixes/tiocgdev
+still_needed? patches.suse/mm-increase-dirty-limits.patch
patches.suse/panic-on-io-nmi-SLE11-user-space-api.patch
+ patches.suse/stop_machine-implement-lazy
########################################################
# Networking, IPv6