]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
another .29 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 30 Jun 2009 18:06:32 +0000 (11:06 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 30 Jun 2009 18:06:32 +0000 (11:06 -0700)
queue-2.6.29/mm-fix-handling-of-pagesets-for-downed-cpus.patch [new file with mode: 0644]
queue-2.6.29/series

diff --git a/queue-2.6.29/mm-fix-handling-of-pagesets-for-downed-cpus.patch b/queue-2.6.29/mm-fix-handling-of-pagesets-for-downed-cpus.patch
new file mode 100644 (file)
index 0000000..7bc6990
--- /dev/null
@@ -0,0 +1,62 @@
+From 364df0ebfbbb1330bfc6ca159f4d6020efc15a12 Mon Sep 17 00:00:00 2001
+From: Dimitri Sivanich <sivanich@sgi.com>
+Date: Tue, 23 Jun 2009 12:37:04 -0700
+Subject: mm: fix handling of pagesets for downed cpus
+
+From: Dimitri Sivanich <sivanich@sgi.com>
+
+commit 364df0ebfbbb1330bfc6ca159f4d6020efc15a12 upstream.
+
+After downing/upping a cpu, an attempt to set
+/proc/sys/vm/percpu_pagelist_fraction results in an oops in
+percpu_pagelist_fraction_sysctl_handler().
+
+If a processor is downed then we need to set the pageset pointer back to
+the boot pageset.
+
+Updates of the high water marks should not access pagesets of unpopulated
+zones (those pointer go to the boot pagesets which would be no longer
+functional if their size would be increased beyond zero).
+
+Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
+Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
+Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Cc: Nick Piggin <nickpiggin@yahoo.com.au>
+Cc: Mel Gorman <mel@csn.ul.ie>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/page_alloc.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -2804,7 +2804,7 @@ bad:
+               if (dzone == zone)
+                       break;
+               kfree(zone_pcp(dzone, cpu));
+-              zone_pcp(dzone, cpu) = NULL;
++              zone_pcp(dzone, cpu) = &boot_pageset[cpu];
+       }
+       return -ENOMEM;
+ }
+@@ -2819,7 +2819,7 @@ static inline void free_zone_pagesets(in
+               /* Free per_cpu_pageset if it is slab allocated */
+               if (pset != &boot_pageset[cpu])
+                       kfree(pset);
+-              zone_pcp(zone, cpu) = NULL;
++              zone_pcp(zone, cpu) = &boot_pageset[cpu];
+       }
+ }
+@@ -4494,6 +4494,8 @@ int percpu_pagelist_fraction_sysctl_hand
+       if (!write || (ret == -EINVAL))
+               return ret;
+       for_each_zone(zone) {
++              if (!populated_zone(zone))
++                      continue;
+               for_each_online_cpu(cpu) {
+                       unsigned long  high;
+                       high = zone->present_pages / percpu_pagelist_fraction;
index d17d9e4ccf6b838733d83495736b515c430ffa39..c1b520114176ca202ee6affb1cd8b7e3f719745b 100644 (file)
@@ -31,3 +31,4 @@ pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch
 pcmcia-cm4000-fix-lock-imbalance.patch
 qla2xxx-correct-overflow-during-dump-processing-on-large-memory-isp23xx-parts.patch
 sound-seq_midi_event-fix-decoding-of-rpn-events.patch
+mm-fix-handling-of-pagesets-for-downed-cpus.patch