aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorHaicheng Li <haicheng.li@linux.intel.com>2010-05-24 17:32:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:01 -0400
commit1f522509c77a5dea8dc384b735314f03908a6415 (patch)
tree4b848527b90877a8a64c46e8e2d76723405c319d /include/linux/mmzone.h
parent319774e25fa4b7641bdc3b0a464dd84e62103347 (diff)
mem-hotplug: avoid multiple zones sharing same boot strapping boot_pageset
For each new populated zone of hotadded node, need to update its pagesets with dynamically allocated per_cpu_pageset struct for all possible CPUs: 1) Detach zone->pageset from the shared boot_pageset at end of __build_all_zonelists(). 2) Use mutex to protect zone->pageset when it's still shared in onlined_pages() Otherwises, multiple zones of different nodes would share same boot strapping boot_pageset for same CPU, which will finally cause below kernel panic: ------------[ cut here ]------------ kernel BUG at mm/page_alloc.c:1239! invalid opcode: 0000 [#1] SMP ... Call Trace: [<ffffffff811300c1>] __alloc_pages_nodemask+0x131/0x7b0 [<ffffffff81162e67>] alloc_pages_current+0x87/0xd0 [<ffffffff81128407>] __page_cache_alloc+0x67/0x70 [<ffffffff811325f0>] __do_page_cache_readahead+0x120/0x260 [<ffffffff81132751>] ra_submit+0x21/0x30 [<ffffffff811329c6>] ondemand_readahead+0x166/0x2c0 [<ffffffff81132ba0>] page_cache_async_readahead+0x80/0xa0 [<ffffffff8112a0e4>] generic_file_aio_read+0x364/0x670 [<ffffffff81266cfa>] nfs_file_read+0xca/0x130 [<ffffffff8117b20a>] do_sync_read+0xfa/0x140 [<ffffffff8117bf75>] vfs_read+0xb5/0x1a0 [<ffffffff8117c151>] sys_read+0x51/0x80 [<ffffffff8103c032>] system_call_fastpath+0x16/0x1b RIP [<ffffffff8112ff13>] get_page_from_freelist+0x883/0x900 RSP <ffff88000d1e78a8> ---[ end trace 4bda28328b9990db ] [akpm@linux-foundation.org: merge fix] Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Reviewed-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f6f2c505fa7e..a367ed5bb3fe 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -652,7 +652,7 @@ typedef struct pglist_data {
652 652
653void get_zone_counts(unsigned long *active, unsigned long *inactive, 653void get_zone_counts(unsigned long *active, unsigned long *inactive,
654 unsigned long *free); 654 unsigned long *free);
655void build_all_zonelists(void); 655void build_all_zonelists(void *data);
656void wakeup_kswapd(struct zone *zone, int order); 656void wakeup_kswapd(struct zone *zone, int order);
657int zone_watermark_ok(struct zone *z, int order, unsigned long mark, 657int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
658 int classzone_idx, int alloc_flags); 658 int classzone_idx, int alloc_flags);