]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.37 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Feb 2011 14:46:23 +0000 (06:46 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Feb 2011 14:46:23 +0000 (06:46 -0800)
queue-2.6.37/mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch [new file with mode: 0644]
queue-2.6.37/net-ax25-fix-information-leak-to-userland-harder.patch [new file with mode: 0644]
queue-2.6.37/revert-exofs-set-i_mapping-backing_dev_info-anyway.patch [new file with mode: 0644]
queue-2.6.37/series
queue-2.6.37/slub-avoid-use-of-slub_lock-in-show_slab_objects.patch [new file with mode: 0644]
queue-2.6.37/x86-olpc-add-missing-kconfig-dependencies.patch [new file with mode: 0644]
queue-2.6.37/xen-platform-use-pci-interfaces-to-request-io-and-mem-resources.patch [new file with mode: 0644]

diff --git a/queue-2.6.37/mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch b/queue-2.6.37/mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
new file mode 100644 (file)
index 0000000..6566fd6
--- /dev/null
@@ -0,0 +1,393 @@
+From 88f5acf88ae6a9778f6d25d0d5d7ec2d57764a97 Mon Sep 17 00:00:00 2001
+From: Mel Gorman <mel@csn.ul.ie>
+Date: Thu, 13 Jan 2011 15:45:41 -0800
+Subject: mm: page allocator: adjust the per-cpu counter threshold when memory is low
+
+From: Mel Gorman <mel@csn.ul.ie>
+
+commit 88f5acf88ae6a9778f6d25d0d5d7ec2d57764a97 upstream.
+
+Commit aa45484 ("calculate a better estimate of NR_FREE_PAGES when memory
+is low") noted that watermarks were based on the vmstat NR_FREE_PAGES.  To
+avoid synchronization overhead, these counters are maintained on a per-cpu
+basis and drained both periodically and when a threshold is above a
+threshold.  On large CPU systems, the difference between the estimate and
+real value of NR_FREE_PAGES can be very high.  The system can get into a
+case where pages are allocated far below the min watermark potentially
+causing livelock issues.  The commit solved the problem by taking a better
+reading of NR_FREE_PAGES when memory was low.
+
+Unfortately, as reported by Shaohua Li this accurate reading can consume a
+large amount of CPU time on systems with many sockets due to cache line
+bouncing.  This patch takes a different approach.  For large machines
+where counter drift might be unsafe and while kswapd is awake, the per-cpu
+thresholds for the target pgdat are reduced to limit the level of drift to
+what should be a safe level.  This incurs a performance penalty in heavy
+memory pressure by a factor that depends on the workload and the machine
+but the machine should function correctly without accidentally exhausting
+all memory on a node.  There is an additional cost when kswapd wakes and
+sleeps but the event is not expected to be frequent - in Shaohua's test
+case, there was one recorded sleep and wake event at least.
+
+To ensure that kswapd wakes up, a safe version of zone_watermark_ok() is
+introduced that takes a more accurate reading of NR_FREE_PAGES when called
+from wakeup_kswapd, when deciding whether it is really safe to go back to
+sleep in sleeping_prematurely() and when deciding if a zone is really
+balanced or not in balance_pgdat().  We are still using an expensive
+function but limiting how often it is called.
+
+When the test case is reproduced, the time spent in the watermark
+functions is reduced.  The following report is on the percentage of time
+spent cumulatively spent in the functions zone_nr_free_pages(),
+zone_watermark_ok(), __zone_watermark_ok(), zone_watermark_ok_safe(),
+zone_page_state_snapshot(), zone_page_state().
+
+vanilla                      11.6615%
+disable-threshold            0.2584%
+
+David said:
+
+: We had to pull aa454840 "mm: page allocator: calculate a better estimate
+: of NR_FREE_PAGES when memory is low and kswapd is awake" from 2.6.36
+: internally because tests showed that it would cause the machine to stall
+: as the result of heavy kswapd activity.  I merged it back with this fix as
+: it is pending in the -mm tree and it solves the issue we were seeing, so I
+: definitely think this should be pushed to -stable (and I would seriously
+: consider it for 2.6.37 inclusion even at this late date).
+
+Signed-off-by: Mel Gorman <mel@csn.ul.ie>
+Reported-by: Shaohua Li <shaohua.li@intel.com>
+Reviewed-by: Christoph Lameter <cl@linux.com>
+Tested-by: Nicolas Bareil <nico@chdir.org>
+Cc: David Rientjes <rientjes@google.com>
+Cc: Kyle McMartin <kyle@mcmartin.ca>
+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>
+
+---
+ include/linux/mmzone.h |   10 ++-----
+ include/linux/vmstat.h |    5 +++
+ mm/mmzone.c            |   21 ---------------
+ mm/page_alloc.c        |   35 +++++++++++++++++++------
+ mm/vmscan.c            |   23 +++++++++-------
+ mm/vmstat.c            |   68 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 6 files changed, 115 insertions(+), 47 deletions(-)
+
+--- a/include/linux/mmzone.h
++++ b/include/linux/mmzone.h
+@@ -458,12 +458,6 @@ static inline int zone_is_oom_locked(con
+       return test_bit(ZONE_OOM_LOCKED, &zone->flags);
+ }
+-#ifdef CONFIG_SMP
+-unsigned long zone_nr_free_pages(struct zone *zone);
+-#else
+-#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
+-#endif /* CONFIG_SMP */
+-
+ /*
+  * The "priority" of VM scanning is how much of the queues we will scan in one
+  * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
+@@ -661,7 +655,9 @@ typedef struct pglist_data {
+ extern struct mutex zonelists_mutex;
+ void build_all_zonelists(void *data);
+ void wakeup_kswapd(struct zone *zone, int order);
+-int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
++bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
++              int classzone_idx, int alloc_flags);
++bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
+               int classzone_idx, int alloc_flags);
+ enum memmap_context {
+       MEMMAP_EARLY,
+--- a/include/linux/vmstat.h
++++ b/include/linux/vmstat.h
+@@ -254,6 +254,8 @@ extern void dec_zone_state(struct zone *
+ extern void __dec_zone_state(struct zone *, enum zone_stat_item);
+ void refresh_cpu_vm_stats(int);
++void reduce_pgdat_percpu_threshold(pg_data_t *pgdat);
++void restore_pgdat_percpu_threshold(pg_data_t *pgdat);
+ #else /* CONFIG_SMP */
+ /*
+@@ -298,6 +300,9 @@ static inline void __dec_zone_page_state
+ #define dec_zone_page_state __dec_zone_page_state
+ #define mod_zone_page_state __mod_zone_page_state
++static inline void reduce_pgdat_percpu_threshold(pg_data_t *pgdat) { }
++static inline void restore_pgdat_percpu_threshold(pg_data_t *pgdat) { }
++
+ static inline void refresh_cpu_vm_stats(int cpu) { }
+ #endif
+--- a/mm/mmzone.c
++++ b/mm/mmzone.c
+@@ -87,24 +87,3 @@ int memmap_valid_within(unsigned long pf
+       return 1;
+ }
+ #endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */
+-
+-#ifdef CONFIG_SMP
+-/* Called when a more accurate view of NR_FREE_PAGES is needed */
+-unsigned long zone_nr_free_pages(struct zone *zone)
+-{
+-      unsigned long nr_free_pages = zone_page_state(zone, NR_FREE_PAGES);
+-
+-      /*
+-       * While kswapd is awake, it is considered the zone is under some
+-       * memory pressure. Under pressure, there is a risk that
+-       * per-cpu-counter-drift will allow the min watermark to be breached
+-       * potentially causing a live-lock. While kswapd is awake and
+-       * free pages are low, get a better estimate for free pages
+-       */
+-      if (nr_free_pages < zone->percpu_drift_mark &&
+-                      !waitqueue_active(&zone->zone_pgdat->kswapd_wait))
+-              return zone_page_state_snapshot(zone, NR_FREE_PAGES);
+-
+-      return nr_free_pages;
+-}
+-#endif /* CONFIG_SMP */
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -1460,24 +1460,24 @@ static inline int should_fail_alloc_page
+ #endif /* CONFIG_FAIL_PAGE_ALLOC */
+ /*
+- * Return 1 if free pages are above 'mark'. This takes into account the order
++ * Return true if free pages are above 'mark'. This takes into account the order
+  * of the allocation.
+  */
+-int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
+-                    int classzone_idx, int alloc_flags)
++static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
++                    int classzone_idx, int alloc_flags, long free_pages)
+ {
+       /* free_pages my go negative - that's OK */
+       long min = mark;
+-      long free_pages = zone_nr_free_pages(z) - (1 << order) + 1;
+       int o;
++      free_pages -= (1 << order) + 1;
+       if (alloc_flags & ALLOC_HIGH)
+               min -= min / 2;
+       if (alloc_flags & ALLOC_HARDER)
+               min -= min / 4;
+       if (free_pages <= min + z->lowmem_reserve[classzone_idx])
+-              return 0;
++              return false;
+       for (o = 0; o < order; o++) {
+               /* At the next order, this order's pages become unavailable */
+               free_pages -= z->free_area[o].nr_free << o;
+@@ -1486,9 +1486,28 @@ int zone_watermark_ok(struct zone *z, in
+               min >>= 1;
+               if (free_pages <= min)
+-                      return 0;
++                      return false;
+       }
+-      return 1;
++      return true;
++}
++
++bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
++                    int classzone_idx, int alloc_flags)
++{
++      return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
++                                      zone_page_state(z, NR_FREE_PAGES));
++}
++
++bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
++                    int classzone_idx, int alloc_flags)
++{
++      long free_pages = zone_page_state(z, NR_FREE_PAGES);
++
++      if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark)
++              free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES);
++
++      return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
++                                                              free_pages);
+ }
+ #ifdef CONFIG_NUMA
+@@ -2442,7 +2461,7 @@ void show_free_areas(void)
+                       " all_unreclaimable? %s"
+                       "\n",
+                       zone->name,
+-                      K(zone_nr_free_pages(zone)),
++                      K(zone_page_state(zone, NR_FREE_PAGES)),
+                       K(min_wmark_pages(zone)),
+                       K(low_wmark_pages(zone)),
+                       K(high_wmark_pages(zone)),
+--- a/mm/vmscan.c
++++ b/mm/vmscan.c
+@@ -2143,7 +2143,7 @@ static int sleeping_prematurely(pg_data_
+               if (zone->all_unreclaimable)
+                       continue;
+-              if (!zone_watermark_ok(zone, order, high_wmark_pages(zone),
++              if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone),
+                                                               0, 0))
+                       return 1;
+       }
+@@ -2230,7 +2230,7 @@ loop_again:
+                               shrink_active_list(SWAP_CLUSTER_MAX, zone,
+                                                       &sc, priority, 0);
+-                      if (!zone_watermark_ok(zone, order,
++                      if (!zone_watermark_ok_safe(zone, order,
+                                       high_wmark_pages(zone), 0, 0)) {
+                               end_zone = i;
+                               break;
+@@ -2276,7 +2276,7 @@ loop_again:
+                        * We put equal pressure on every zone, unless one
+                        * zone has way too many pages free already.
+                        */
+-                      if (!zone_watermark_ok(zone, order,
++                      if (!zone_watermark_ok_safe(zone, order,
+                                       8*high_wmark_pages(zone), end_zone, 0))
+                               shrink_zone(priority, zone, &sc);
+                       reclaim_state->reclaimed_slab = 0;
+@@ -2297,7 +2297,7 @@ loop_again:
+                           total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2)
+                               sc.may_writepage = 1;
+-                      if (!zone_watermark_ok(zone, order,
++                      if (!zone_watermark_ok_safe(zone, order,
+                                       high_wmark_pages(zone), end_zone, 0)) {
+                               all_zones_ok = 0;
+                               /*
+@@ -2305,7 +2305,7 @@ loop_again:
+                                * means that we have a GFP_ATOMIC allocation
+                                * failure risk. Hurry up!
+                                */
+-                              if (!zone_watermark_ok(zone, order,
++                              if (!zone_watermark_ok_safe(zone, order,
+                                           min_wmark_pages(zone), end_zone, 0))
+                                       has_under_min_watermark_zone = 1;
+                       } else {
+@@ -2448,7 +2448,9 @@ static int kswapd(void *p)
+                                */
+                               if (!sleeping_prematurely(pgdat, order, remaining)) {
+                                       trace_mm_vmscan_kswapd_sleep(pgdat->node_id);
++                                      restore_pgdat_percpu_threshold(pgdat);
+                                       schedule();
++                                      reduce_pgdat_percpu_threshold(pgdat);
+                               } else {
+                                       if (remaining)
+                                               count_vm_event(KSWAPD_LOW_WMARK_HIT_QUICKLY);
+@@ -2487,16 +2489,17 @@ void wakeup_kswapd(struct zone *zone, in
+       if (!populated_zone(zone))
+               return;
+-      pgdat = zone->zone_pgdat;
+-      if (zone_watermark_ok(zone, order, low_wmark_pages(zone), 0, 0))
++      if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
+               return;
++      pgdat = zone->zone_pgdat;
+       if (pgdat->kswapd_max_order < order)
+               pgdat->kswapd_max_order = order;
+-      trace_mm_vmscan_wakeup_kswapd(pgdat->node_id, zone_idx(zone), order);
+-      if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
+-              return;
+       if (!waitqueue_active(&pgdat->kswapd_wait))
+               return;
++      if (zone_watermark_ok_safe(zone, order, low_wmark_pages(zone), 0, 0))
++              return;
++
++      trace_mm_vmscan_wakeup_kswapd(pgdat->node_id, zone_idx(zone), order);
+       wake_up_interruptible(&pgdat->kswapd_wait);
+ }
+--- a/mm/vmstat.c
++++ b/mm/vmstat.c
+@@ -83,6 +83,30 @@ EXPORT_SYMBOL(vm_stat);
+ #ifdef CONFIG_SMP
++static int calculate_pressure_threshold(struct zone *zone)
++{
++      int threshold;
++      int watermark_distance;
++
++      /*
++       * As vmstats are not up to date, there is drift between the estimated
++       * and real values. For high thresholds and a high number of CPUs, it
++       * is possible for the min watermark to be breached while the estimated
++       * value looks fine. The pressure threshold is a reduced value such
++       * that even the maximum amount of drift will not accidentally breach
++       * the min watermark
++       */
++      watermark_distance = low_wmark_pages(zone) - min_wmark_pages(zone);
++      threshold = max(1, (int)(watermark_distance / num_online_cpus()));
++
++      /*
++       * Maximum threshold is 125
++       */
++      threshold = min(125, threshold);
++
++      return threshold;
++}
++
+ static int calculate_threshold(struct zone *zone)
+ {
+       int threshold;
+@@ -161,6 +185,48 @@ static void refresh_zone_stat_thresholds
+       }
+ }
++void reduce_pgdat_percpu_threshold(pg_data_t *pgdat)
++{
++      struct zone *zone;
++      int cpu;
++      int threshold;
++      int i;
++
++      get_online_cpus();
++      for (i = 0; i < pgdat->nr_zones; i++) {
++              zone = &pgdat->node_zones[i];
++              if (!zone->percpu_drift_mark)
++                      continue;
++
++              threshold = calculate_pressure_threshold(zone);
++              for_each_online_cpu(cpu)
++                      per_cpu_ptr(zone->pageset, cpu)->stat_threshold
++                                                      = threshold;
++      }
++      put_online_cpus();
++}
++
++void restore_pgdat_percpu_threshold(pg_data_t *pgdat)
++{
++      struct zone *zone;
++      int cpu;
++      int threshold;
++      int i;
++
++      get_online_cpus();
++      for (i = 0; i < pgdat->nr_zones; i++) {
++              zone = &pgdat->node_zones[i];
++              if (!zone->percpu_drift_mark)
++                      continue;
++
++              threshold = calculate_threshold(zone);
++              for_each_online_cpu(cpu)
++                      per_cpu_ptr(zone->pageset, cpu)->stat_threshold
++                                                      = threshold;
++      }
++      put_online_cpus();
++}
++
+ /*
+  * For use when we know that interrupts are disabled.
+  */
+@@ -834,7 +900,7 @@ static void zoneinfo_show_print(struct s
+                  "\n        scanned  %lu"
+                  "\n        spanned  %lu"
+                  "\n        present  %lu",
+-                 zone_nr_free_pages(zone),
++                 zone_page_state(zone, NR_FREE_PAGES),
+                  min_wmark_pages(zone),
+                  low_wmark_pages(zone),
+                  high_wmark_pages(zone),
diff --git a/queue-2.6.37/net-ax25-fix-information-leak-to-userland-harder.patch b/queue-2.6.37/net-ax25-fix-information-leak-to-userland-harder.patch
new file mode 100644 (file)
index 0000000..d1ace21
--- /dev/null
@@ -0,0 +1,33 @@
+From 5b919f833d9d60588d026ad82d17f17e8872c7a9 Mon Sep 17 00:00:00 2001
+From: Kees Cook <kees.cook@canonical.com>
+Date: Wed, 12 Jan 2011 00:34:49 -0800
+Subject: net: ax25: fix information leak to userland harder
+
+From: Kees Cook <kees.cook@canonical.com>
+
+commit 5b919f833d9d60588d026ad82d17f17e8872c7a9 upstream.
+
+Commit fe10ae53384e48c51996941b7720ee16995cbcb7 adds a memset() to clear
+the structure being sent back to userspace, but accidentally used the
+wrong size.
+
+Reported-by: Brad Spengler <spender@grsecurity.net>
+Signed-off-by: Kees Cook <kees.cook@canonical.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ax25/af_ax25.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ax25/af_ax25.c
++++ b/net/ax25/af_ax25.c
+@@ -1392,7 +1392,7 @@ static int ax25_getname(struct socket *s
+       ax25_cb *ax25;
+       int err = 0;
+-      memset(fsa, 0, sizeof(fsa));
++      memset(fsa, 0, sizeof(*fsa));
+       lock_sock(sk);
+       ax25 = ax25_sk(sk);
diff --git a/queue-2.6.37/revert-exofs-set-i_mapping-backing_dev_info-anyway.patch b/queue-2.6.37/revert-exofs-set-i_mapping-backing_dev_info-anyway.patch
new file mode 100644 (file)
index 0000000..82e1544
--- /dev/null
@@ -0,0 +1,45 @@
+From 0b0abeaf3d30cec03ac6497fe978b8f7edecc5ae Mon Sep 17 00:00:00 2001
+From: Boaz Harrosh <bharrosh@panasas.com>
+Date: Wed, 2 Feb 2011 21:02:12 +0200
+Subject: Revert "exofs: Set i_mapping->backing_dev_info anyway"
+
+From: Boaz Harrosh <bharrosh@panasas.com>
+
+commit 0b0abeaf3d30cec03ac6497fe978b8f7edecc5ae upstream.
+
+This reverts commit 115e19c53501edc11f730191f7f047736815ae3d.
+
+Apparently setting inode->bdi to one's own sb->s_bdi stops VFS from
+sending *read-aheads*.  This problem was bisected to this commit.  A
+revert fixes it.  I'll investigate farther why is this happening for the
+next Kernel, but for now a revert.
+
+I'm sending to stable@kernel.org as well, since it exists also in
+2.6.37.  2.6.36 is good and does not have this patch.
+
+Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/exofs/inode.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/fs/exofs/inode.c
++++ b/fs/exofs/inode.c
+@@ -1030,7 +1030,6 @@ struct inode *exofs_iget(struct super_bl
+               memcpy(oi->i_data, fcb.i_data, sizeof(fcb.i_data));
+       }
+-      inode->i_mapping->backing_dev_info = sb->s_bdi;
+       if (S_ISREG(inode->i_mode)) {
+               inode->i_op = &exofs_file_inode_operations;
+               inode->i_fop = &exofs_file_operations;
+@@ -1131,7 +1130,6 @@ struct inode *exofs_new_inode(struct ino
+       sbi = sb->s_fs_info;
+-      inode->i_mapping->backing_dev_info = sb->s_bdi;
+       sb->s_dirt = 1;
+       inode_init_owner(inode, dir, mode);
+       inode->i_ino = sbi->s_nextid++;
index 5bff69601f5dce5e274febabd3a6d081c2a09b28..175486030bb3f7a3ea96b059be130786313e543a 100644 (file)
@@ -174,3 +174,9 @@ arm-s5pv310-set-bit-22-in-the-pl310-cache-controller-auxctlr-register.patch
 arm-initrd-disable-initrd-if-passed-address-overlaps-reserved-region.patch
 memcg-fix-account-leak-at-failure-of-memsw-acconting.patch
 mmc-bfin_sdh-fix-alloc-size-for-private-data.patch
+revert-exofs-set-i_mapping-backing_dev_info-anyway.patch
+slub-avoid-use-of-slub_lock-in-show_slab_objects.patch
+x86-olpc-add-missing-kconfig-dependencies.patch
+net-ax25-fix-information-leak-to-userland-harder.patch
+xen-platform-use-pci-interfaces-to-request-io-and-mem-resources.patch
+mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
diff --git a/queue-2.6.37/slub-avoid-use-of-slub_lock-in-show_slab_objects.patch b/queue-2.6.37/slub-avoid-use-of-slub_lock-in-show_slab_objects.patch
new file mode 100644 (file)
index 0000000..1e6cb58
--- /dev/null
@@ -0,0 +1,52 @@
+From 04d94879c8a4973b5499dc26b9d38acee8928791 Mon Sep 17 00:00:00 2001
+From: Christoph Lameter <cl@linux.com>
+Date: Mon, 10 Jan 2011 10:15:15 -0600
+Subject: slub: Avoid use of slub_lock in show_slab_objects()
+
+From: Christoph Lameter <cl@linux.com>
+
+commit 04d94879c8a4973b5499dc26b9d38acee8928791 upstream.
+
+The purpose of the locking is to prevent removal and additions
+of nodes when statistics are gathered for a slab cache. So we
+need to avoid racing with memory hotplug functionality.
+
+It is enough to take the memory hotplug locks there instead
+of the slub_lock.
+
+online_pages() currently does not acquire the memory_hotplug
+lock. Another patch will be submitted by the memory hotplug
+authors to take the memory hotplug lock and describe the
+uses of the memory hotplug lock to protect against
+adding and removal of nodes from non hotplug data structures.
+
+Reported-and-tested-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Christoph Lameter <cl@linux.com>
+Signed-off-by: Pekka Enberg <penberg@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/slub.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -3821,7 +3821,7 @@ static ssize_t show_slab_objects(struct
+               }
+       }
+-      down_read(&slub_lock);
++      lock_memory_hotplug();
+ #ifdef CONFIG_SLUB_DEBUG
+       if (flags & SO_ALL) {
+               for_each_node_state(node, N_NORMAL_MEMORY) {
+@@ -3862,7 +3862,7 @@ static ssize_t show_slab_objects(struct
+                       x += sprintf(buf + x, " N%d=%lu",
+                                       node, nodes[node]);
+ #endif
+-      up_read(&slub_lock);
++      unlock_memory_hotplug();
+       kfree(nodes);
+       return x + sprintf(buf + x, "\n");
+ }
diff --git a/queue-2.6.37/x86-olpc-add-missing-kconfig-dependencies.patch b/queue-2.6.37/x86-olpc-add-missing-kconfig-dependencies.patch
new file mode 100644 (file)
index 0000000..c01e495
--- /dev/null
@@ -0,0 +1,33 @@
+From 76d1f7bfcd5872056902c5a88b5fcd5d4d00a7a9 Mon Sep 17 00:00:00 2001
+From: H. Peter Anvin <hpa@linux.intel.com>
+Date: Fri, 14 Jan 2011 11:57:06 -0800
+Subject: x86, olpc: Add missing Kconfig dependencies
+
+From: H. Peter Anvin <hpa@linux.intel.com>
+
+commit 76d1f7bfcd5872056902c5a88b5fcd5d4d00a7a9 upstream.
+
+OLPC uses select for OLPC_OPENFIRMWARE, which means OLPC has to
+enforce the dependencies for OLPC_OPENFIRMWARE.  Make sure it does so.
+
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Cc: Daniel Drake <dsd@laptop.org>
+Cc: Andres Salomon <dilinger@queued.net>
+Cc: Grant Likely <grant.likely@secretlab.ca>
+LKML-Reference: <20100923162846.D8D409D401B@zog.reactivated.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -2035,6 +2035,7 @@ config OLPC
+       bool "One Laptop Per Child support"
+       select GPIOLIB
+       select OLPC_OPENFIRMWARE
++      depends on !X86_64 && !X86_PAE
+       ---help---
+         Add support for detecting the unique features of the OLPC
+         XO hardware.
diff --git a/queue-2.6.37/xen-platform-use-pci-interfaces-to-request-io-and-mem-resources.patch b/queue-2.6.37/xen-platform-use-pci-interfaces-to-request-io-and-mem-resources.patch
new file mode 100644 (file)
index 0000000..783ccb7
--- /dev/null
@@ -0,0 +1,77 @@
+From 00f28e4037c8d5782fa7a1b2666b0dca21522d69 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ian.campbell@citrix.com>
+Date: Tue, 11 Jan 2011 11:50:28 +0000
+Subject: xen-platform: use PCI interfaces to request IO and MEM resources.
+
+From: Ian Campbell <ian.campbell@citrix.com>
+
+commit 00f28e4037c8d5782fa7a1b2666b0dca21522d69 upstream.
+
+This is the correct interface to use and something has broken the use
+of the previous incorrect interface (which fails because the request
+conflicts with the resources assigned for the PCI device itself
+instead of nesting like the PCI interfaces do).
+
+Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/xen/platform-pci.c |   21 +++++++--------------
+ 1 file changed, 7 insertions(+), 14 deletions(-)
+
+--- a/drivers/xen/platform-pci.c
++++ b/drivers/xen/platform-pci.c
+@@ -105,7 +105,7 @@ static int __devinit platform_pci_init(s
+                                      const struct pci_device_id *ent)
+ {
+       int i, ret;
+-      long ioaddr, iolen;
++      long ioaddr;
+       long mmio_addr, mmio_len;
+       unsigned int max_nr_gframes;
+@@ -114,7 +114,6 @@ static int __devinit platform_pci_init(s
+               return i;
+       ioaddr = pci_resource_start(pdev, 0);
+-      iolen = pci_resource_len(pdev, 0);
+       mmio_addr = pci_resource_start(pdev, 1);
+       mmio_len = pci_resource_len(pdev, 1);
+@@ -125,19 +124,13 @@ static int __devinit platform_pci_init(s
+               goto pci_out;
+       }
+-      if (request_mem_region(mmio_addr, mmio_len, DRV_NAME) == NULL) {
+-              dev_err(&pdev->dev, "MEM I/O resource 0x%lx @ 0x%lx busy\n",
+-                     mmio_addr, mmio_len);
+-              ret = -EBUSY;
++      ret = pci_request_region(pdev, 1, DRV_NAME);
++      if (ret < 0)
+               goto pci_out;
+-      }
+-      if (request_region(ioaddr, iolen, DRV_NAME) == NULL) {
+-              dev_err(&pdev->dev, "I/O resource 0x%lx @ 0x%lx busy\n",
+-                     iolen, ioaddr);
+-              ret = -EBUSY;
++      ret = pci_request_region(pdev, 0, DRV_NAME);
++      if (ret < 0)
+               goto mem_out;
+-      }
+       platform_mmio = mmio_addr;
+       platform_mmiolen = mmio_len;
+@@ -169,9 +162,9 @@ static int __devinit platform_pci_init(s
+       return 0;
+ out:
+-      release_region(ioaddr, iolen);
++      pci_release_region(pdev, 0);
+ mem_out:
+-      release_mem_region(mmio_addr, mmio_len);
++      pci_release_region(pdev, 1);
+ pci_out:
+       pci_disable_device(pdev);
+       return ret;