diff options
author | Josh Boyer <jwboyer@redhat.com> | 2011-08-15 10:06:52 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@redhat.com> | 2011-08-15 10:06:52 -0400 |
commit | 6920e17ebc39b209f18c9fcf8cccf19b3b984560 (patch) | |
tree | 0b8caccd4041abb4c068dfe14b6eb9de711e852d | |
parent | f1b16b1fca682d767ea2cc2f91837fd34a4bf577 (diff) | |
download | kernel-6920e17ebc39b209f18c9fcf8cccf19b3b984560.tar.gz kernel-6920e17ebc39b209f18c9fcf8cccf19b3b984560.tar.xz kernel-6920e17ebc39b209f18c9fcf8cccf19b3b984560.zip |
Linux-3.1-rc2
Add better fix from Paul McKenney for rcu scheduling issue (rhbz 726877)
-rw-r--r-- | kernel.spec | 12 | ||||
-rw-r--r-- | rcu-avoid-just-onlined-cpu-resched.patch | 47 | ||||
-rw-r--r-- | rcu-prevent-early-schedule.patch | 34 | ||||
-rw-r--r-- | sources | 3 |
4 files changed, 56 insertions, 40 deletions
diff --git a/kernel.spec b/kernel.spec index 91839efb9..60dd89a4d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -82,9 +82,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 1 +%define rcrev 2 # The git snapshot level -%define gitrev 6 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -684,7 +684,7 @@ Patch12021: udlfb-bind-framebuffer-to-interface.patch Patch12022: fix-cdc-ncm-dma-stack-vars.patch Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch Patch12024: epoll-fix-spurious-lockdep-warnings.patch -Patch12025: rcu-prevent-early-schedule.patch +Patch12025: rcu-avoid-just-onlined-cpu-resched.patch # Runtime power management Patch12203: linux-2.6-usb-pci-autosuspend.patch @@ -1261,7 +1261,7 @@ ApplyPatch udlfb-bind-framebuffer-to-interface.patch ApplyPatch fix-cdc-ncm-dma-stack-vars.patch ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch ApplyPatch epoll-fix-spurious-lockdep-warnings.patch -ApplyPatch rcu-prevent-early-schedule.patch +ApplyPatch rcu-avoid-just-onlined-cpu-resched.patch # Runtime PM #ApplyPatch linux-2.6-usb-pci-autosuspend.patch @@ -1898,6 +1898,10 @@ fi # ||----w | # || || %changelog +* Mon Aug 15 2011 Josh Boyer <jwboyer@redhat.com> +- Linux-3.1-rc2 +- Replace trial patch for rhbz 726877 with a better fix + * Thu Aug 11 2011 Josh Boyer <jwboyer@redhat.com> - Linux-3.1-rc1-git6 - Make ide_pmac a module (rhbz 730039) diff --git a/rcu-avoid-just-onlined-cpu-resched.patch b/rcu-avoid-just-onlined-cpu-resched.patch new file mode 100644 index 000000000..517f37591 --- /dev/null +++ b/rcu-avoid-just-onlined-cpu-resched.patch @@ -0,0 +1,47 @@ +rcu: Avoid having just-onlined CPU resched itself when RCU is idle + +CPUs set rdp->qs_pending when coming online to resolve races with +grace-period start. However, this means that if RCU is idle, the +just-onlined CPU might needlessly send itself resched IPIs. Adjust +the online-CPU initialization to avoid this, and also to correctly +cause the CPU to respond to the current grace period if needed. + +Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> +--- + kernel/rcutree.c | 13 +++++++++---- + 1 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/kernel/rcutree.c b/kernel/rcutree.c +index ba06207..472d6b2 100644 +--- a/kernel/rcutree.c ++++ b/kernel/rcutree.c +@@ -1865,8 +1865,6 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible) + + /* Set up local state, ensuring consistent view of global state. */ + raw_spin_lock_irqsave(&rnp->lock, flags); +- rdp->passed_quiesc = 0; /* We could be racing with new GP, */ +- rdp->qs_pending = 1; /* so set up to respond to current GP. */ + rdp->beenonline = 1; /* We have now been online. */ + rdp->preemptible = preemptible; + rdp->qlen_last_fqs_check = 0; +@@ -1891,8 +1889,15 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible) + rnp->qsmaskinit |= mask; + mask = rnp->grpmask; + if (rnp == rdp->mynode) { +- rdp->gpnum = rnp->completed; /* if GP in progress... */ +- rdp->completed = rnp->completed; ++ /* ++ * If there is a grace period in progress, we will ++ * set up to wait for it next time we run the ++ * RCU core code. ++ */ ++ rdp->gpnum = rnp->completed; ++ rdp->completed = rnp->completed; ++ rdp->passed_quiesc = 0; ++ rdp->qs_pending = 0; + rdp->passed_quiesc_completed = rnp->completed - 1; + } + raw_spin_unlock(&rnp->lock); /* irqs already disabled. */ +-- +1.7.6 + diff --git a/rcu-prevent-early-schedule.patch b/rcu-prevent-early-schedule.patch deleted file mode 100644 index 849aaa628..000000000 --- a/rcu-prevent-early-schedule.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 05b0c3b7b05471a6d53300cf6d7d88ee66eff7ed Mon Sep 17 00:00:00 2001 -From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> -Date: Thu, 4 Aug 2011 11:10:24 -0400 -Subject: [PATCH] rcu: Prevent early boot set_need_resched() from - __rcu_pending() - -There isn't a whole lot of point in poking the scheduler before there -are other tasks to switch to. This commit therefore adds a check -for rcu_scheduler_fully_active in __rcu_pending() to suppress any -pre-scheduler calls to set_need_resched(). The downside of this approach -is additional runtime overhead in a reasonably hot code path. - -Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> -Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> ---- - kernel/rcutree.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/kernel/rcutree.c b/kernel/rcutree.c -index ba06207..9c8a3f9 100644 ---- a/kernel/rcutree.c -+++ b/kernel/rcutree.c -@@ -1671,7 +1671,7 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) - check_cpu_stall(rsp, rdp); - - /* Is the RCU core waiting for a quiescent state from this CPU? */ -- if (rdp->qs_pending && !rdp->passed_quiesc) { -+ if (rcu_scheduler_fully_active && rdp->qs_pending && !rdp->passed_quiesc) { - - /* - * If force_quiescent_state() coming soon and this CPU --- -1.7.6 - @@ -1,3 +1,2 @@ 398e95866794def22b12dfbc15ce89c0 linux-3.0.tar.bz2 -9246c18f0f001dcb9a4c761541594655 patch-3.1-rc1.bz2 -ebb0b7c5b76a812f0e7f64e2b6bbc211 patch-3.1-rc1-git6.bz2 +f358c354ab6d3b0da1265b504f85ec50 patch-3.1-rc2.bz2 |