KAMEZAWA Hiroyuki
f2dbcfa738
mm: clean up for early_pfn_to_nid()
...
What's happening is that the assertion in mm/page_alloc.c:move_freepages()
is triggering:
BUG_ON(page_zone(start_page) != page_zone(end_page));
Once I knew this is what was happening, I added some annotations:
if (unlikely(page_zone(start_page) != page_zone(end_page))) {
printk(KERN_ERR "move_freepages: Bogus zones: "
"start_page[%p] end_page[%p] zone[%p]\n",
start_page, end_page, zone);
printk(KERN_ERR "move_freepages: "
"start_zone[%p] end_zone[%p]\n",
page_zone(start_page), page_zone(end_page));
printk(KERN_ERR "move_freepages: "
"start_pfn[0x%lx] end_pfn[0x%lx]\n",
page_to_pfn(start_page), page_to_pfn(end_page));
printk(KERN_ERR "move_freepages: "
"start_nid[%d] end_nid[%d]\n",
page_to_nid(start_page), page_to_nid(end_page));
...
And here's what I got:
move_freepages: Bogus zones: start_page[2207d0000] end_page[2207dffc0] zone[fffff8103effcb00]
move_freepages: start_zone[fffff8103effcb00] end_zone[fffff8003fffeb00]
move_freepages: start_pfn[0x81f600] end_pfn[0x81f7ff]
move_freepages: start_nid[1] end_nid[0]
My memory layout on this box is:
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x0081ff5d
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[8] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00020000
[ 0.000000] 1: 0x00800000 -> 0x0081f7ff
[ 0.000000] 1: 0x0081f800 -> 0x0081fe50
[ 0.000000] 1: 0x0081fed1 -> 0x0081fed8
[ 0.000000] 1: 0x0081feda -> 0x0081fedb
[ 0.000000] 1: 0x0081fedd -> 0x0081fee5
[ 0.000000] 1: 0x0081fee7 -> 0x0081ff51
[ 0.000000] 1: 0x0081ff59 -> 0x0081ff5d
So it's a block move in that 0x81f600-->0x81f7ff region which triggers
the problem.
This patch:
Declaration of early_pfn_to_nid() is scattered over per-arch include
files, and it seems it's complicated to know when the declaration is used.
I think it makes fix-for-memmap-init not easy.
This patch moves all declaration to include/linux/mm.h
After this,
if !CONFIG_NODES_POPULATES_NODE_MAP && !CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
-> Use static definition in include/linux/mm.h
else if !CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
-> Use generic definition in mm/page_alloc.c
else
-> per-arch back end function will be called.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reported-by: David Miller <davem@davemlloft.net>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-18 15:37:55 -08:00
..
2009-01-06 18:10:26 -08:00
2009-01-30 19:50:25 +05:30
2009-01-30 19:59:53 +05:30
2009-01-06 17:14:01 -08:00
2009-01-06 11:53:56 -05:00
2009-01-11 01:34:25 +01:00
2008-12-22 07:15:03 -08:00
2008-12-31 18:18:13 +01:00
2009-01-09 12:37:15 -08:00
2009-01-30 20:00:47 +05:30
2008-11-04 14:27:15 +01:00
2008-11-20 15:59:56 +01:00
2008-11-20 15:59:56 +01:00
2009-01-30 23:30:42 +05:30
2009-01-30 23:32:45 +05:30
2009-01-08 20:10:38 +00:00
2009-01-30 23:33:12 +05:30
2008-11-10 13:50:19 -08:00
2009-01-06 11:53:47 -05:00
2009-01-30 23:34:34 +05:30
2009-01-30 23:36:36 +05:30
2009-01-30 23:37:37 +05:30
2008-12-22 18:30:29 +00:00
2009-01-07 10:00:22 -08:00
2009-01-02 10:19:37 -08:00
2009-01-09 03:41:08 -05:00
2008-10-20 11:01:52 -07:00
2009-01-15 16:39:41 -08:00
2009-01-30 23:38:03 +05:30
2008-12-29 08:29:50 +01:00
2009-01-06 11:38:14 -07:00
2009-02-08 09:56:11 -08:00
2009-02-02 22:45:10 -05:00
2009-01-30 23:38:37 +05:30
2009-01-15 16:39:41 -08:00
2008-12-03 22:12:38 -08:00
2009-01-30 23:39:08 +05:30
2008-12-03 22:12:38 -08:00
2009-01-09 11:52:14 -08:00
2009-01-04 15:14:42 -05:00
2009-01-06 15:59:23 -08:00
2009-01-30 23:39:42 +05:30
2009-01-08 08:31:12 -08:00
2008-10-20 08:50:25 -07:00
2009-01-08 15:37:43 +00:00
2008-10-20 08:52:42 -07:00
2009-01-30 23:40:06 +05:30
2009-01-06 15:59:29 -08:00
2009-02-02 12:41:07 +01:00
2008-12-30 09:05:13 +10:30
2009-01-01 10:12:19 +10:30
2009-02-02 08:43:48 +01:00
2009-01-30 23:40:35 +05:30
2009-01-04 13:33:20 -08:00
2008-11-28 12:38:38 +01:00
2009-01-09 16:54:42 -08:00
2008-11-12 17:17:18 -08:00
2009-01-30 23:41:27 +05:30
2009-01-15 16:39:41 -08:00
2009-01-30 23:44:08 +05:30
2008-11-07 22:56:00 -08:00
2009-02-11 14:25:36 -08:00
2009-01-30 23:44:41 +05:30
2008-10-16 11:21:32 -07:00
2009-01-30 22:35:29 +01:00
2008-11-09 11:17:33 -08:00
2009-01-14 14:15:14 +01:00
2009-01-02 12:19:34 -08:00
2009-01-02 09:29:43 -08:00
2009-01-09 16:54:41 -08:00
2009-01-02 09:23:03 -08:00
2009-01-15 16:39:41 -08:00
2008-10-14 12:12:02 -07:00
2008-12-29 17:47:23 +10:00
2009-01-06 09:05:31 +01:00
2009-01-01 10:12:30 +10:30
2009-01-08 08:31:11 -08:00
2008-10-23 18:51:22 +04:00
2008-12-25 11:01:43 +11:00
2008-11-24 18:57:41 -05:00
2009-02-05 16:48:53 +11:00
2009-01-15 16:39:41 -08:00
2008-12-31 18:07:38 -05:00
2008-12-21 20:10:29 -08:00
2008-12-08 01:19:06 -08:00
2009-01-26 19:21:26 -08:00
2009-01-06 03:05:09 +00:00
2009-01-09 15:06:12 -08:00
2008-10-13 09:51:43 -07:00
2009-01-12 20:56:41 +01:00
2009-01-30 23:45:32 +05:30
2008-10-21 17:45:06 +01:00
2009-01-04 11:00:05 +01:00
2009-02-18 15:37:55 -08:00
2009-01-03 11:57:35 +01:00
2009-01-28 07:50:14 -08:00
2009-01-30 23:46:03 +05:30
2009-01-05 08:40:21 -08:00
2009-01-05 08:40:25 -08:00
2009-01-05 08:40:25 -08:00
2008-10-15 12:46:51 +01:00
2009-01-06 11:38:16 -07:00
2008-10-16 09:24:47 -07:00
2009-01-30 23:46:40 +05:30
2008-10-16 16:53:13 +02:00
2009-01-30 23:47:07 +05:30
2008-12-29 08:29:50 +01:00
2009-01-30 23:47:59 +05:30
2009-01-30 23:48:33 +05:30
2009-01-30 23:49:07 +05:30
2008-11-23 23:24:32 -08:00
2008-12-15 23:44:31 -08:00
2009-01-08 08:31:00 -08:00
2009-01-08 08:31:00 -08:00
2009-01-08 17:14:59 -08:00
2009-01-08 17:14:59 -08:00
2008-10-16 11:21:30 -07:00
2008-12-29 11:27:46 +02:00
2009-02-05 12:56:46 -08:00
2008-11-20 20:29:48 -08:00
2008-12-31 18:07:42 -05:00
2008-10-21 07:47:06 -04:00
2008-11-20 00:49:27 -08:00
2008-10-15 22:21:11 +02:00
2008-10-30 11:38:45 -07:00
2008-12-31 18:07:42 -05:00
2009-02-18 15:37:53 -08:00
2008-12-16 15:29:15 -08:00
2008-10-21 07:47:06 -04:00
2008-11-26 01:59:45 +01:00
2008-12-21 09:46:45 +01:00
2008-12-01 19:14:02 +01:00
2008-11-24 20:00:40 +01:00
2009-01-02 10:19:38 -08:00
2009-01-30 23:49:39 +05:30
2008-12-29 08:29:51 +01:00
2009-01-06 15:59:01 -08:00
2009-01-30 23:50:12 +05:30
2008-10-27 22:33:04 -04:00
2008-10-16 11:21:40 -07:00
2008-12-30 16:10:19 -08:00
2008-12-08 01:14:16 -08:00
2009-01-30 23:50:37 +05:30
2009-01-30 23:51:17 +05:30
2009-01-04 01:00:51 +01:00
2008-11-27 23:39:48 +00:00
2008-11-20 20:32:15 -08:00
2008-11-25 15:45:46 +01:00
2009-02-10 14:56:59 -08:00
2008-10-22 20:21:30 +02:00
2009-01-26 21:19:52 +01:00
2009-01-26 21:19:57 +01:00
2008-10-16 11:21:38 -07:00
2008-10-24 12:54:18 -04:00
2009-01-30 23:51:41 +05:30
2009-01-14 19:19:04 +01:00
2008-12-01 19:55:25 -08:00
2008-12-12 13:48:20 -05:00
2009-01-30 23:52:16 +05:30
2009-01-30 23:52:41 +05:30
2008-12-17 15:47:48 -08:00
2008-10-13 19:01:08 -07:00
2009-01-30 23:53:12 +05:30
2008-10-13 19:01:08 -07:00
2009-01-26 12:30:12 -08:00
2009-01-30 23:53:40 +05:30
2009-01-30 23:54:53 +05:30
2009-01-30 23:55:45 +05:30
2009-01-15 16:39:41 -08:00
2009-01-15 16:39:41 -08:00
2009-01-30 23:56:13 +05:30
2009-01-30 23:56:48 +05:30
2009-02-02 13:27:44 -08:00
2009-01-06 10:50:09 -08:00
2008-11-03 18:16:50 -08:00
2009-01-30 23:57:16 +05:30
2008-11-16 19:32:39 -08:00
2009-01-30 23:57:43 +05:30
2009-02-05 13:04:33 +01:00
2008-10-29 22:02:09 +01:00
2008-11-15 12:26:44 -08:00
2009-01-15 16:39:41 -08:00
2009-01-03 14:11:08 +01:00
2009-01-06 17:10:53 -08:00
2008-11-03 18:21:45 +01:00
2008-10-16 11:21:33 -07:00
2009-01-03 14:10:09 +01:00
2009-01-15 16:39:38 -08:00
2009-01-05 22:46:26 -05:00
2008-10-15 14:24:08 +02:00
2009-01-30 23:58:12 +05:30
2009-01-30 23:59:12 +05:30
2009-01-30 23:58:41 +05:30
2009-01-30 23:59:44 +05:30
2009-01-31 00:00:06 +05:30
2009-01-02 11:44:09 -08:00
2009-01-05 14:53:30 +01:00
2009-01-02 10:19:40 -08:00
2009-02-10 11:15:34 -05:00
2009-01-15 16:39:37 -08:00
2008-12-23 15:21:56 -05:00
2009-01-05 08:40:30 -08:00
2009-01-15 16:39:41 -08:00
2008-10-16 11:21:31 -07:00
2009-02-02 23:55:27 -08:00
2008-12-31 15:11:46 +01:00
2009-02-05 12:56:46 -08:00
2008-10-31 10:01:56 +01:00
2008-11-14 10:39:24 +11:00
2008-11-14 10:39:14 +11:00
2009-01-20 20:52:10 -08:00
2008-10-16 11:21:29 -07:00
2009-01-29 18:04:43 -08:00
2009-02-15 02:47:36 +02:00
2009-02-15 02:47:35 +02:00
2009-01-08 12:38:58 +00:00
2009-01-08 17:55:03 +00:00
2008-12-30 09:26:11 +10:30
2009-02-02 23:04:31 -05:00
2008-11-24 11:43:21 -05:00
2008-11-27 12:37:54 +01:00
2008-11-16 19:37:55 -08:00
2008-12-30 16:20:19 -08:00
2009-01-15 16:39:41 -08:00
2009-01-15 16:39:38 -08:00
2008-12-29 04:59:31 -08:00
2008-11-28 16:47:41 +01:00
2009-01-15 16:39:41 -08:00
2008-11-16 18:59:45 -08:00
2009-01-08 08:31:10 -08:00
2009-01-06 15:59:00 -08:00
2009-01-06 15:59:00 -08:00
2009-01-09 16:54:41 -08:00
2009-01-06 15:59:00 -08:00
2008-12-16 02:00:48 -08:00
2009-01-31 00:00:35 +05:30
2008-11-26 12:03:54 +01:00
2009-01-09 22:44:25 +01:00
2009-01-11 17:55:16 +01:00
2009-01-08 08:31:07 -08:00
2009-01-08 12:04:47 +00:00
2009-02-18 15:37:55 -08:00
2008-10-14 10:37:17 +02:00
2009-01-08 08:31:07 -08:00
2009-01-27 16:06:21 -08:00
2009-02-07 08:33:01 -08:00
2009-01-05 08:40:13 +10:30
2008-10-22 10:00:23 +11:00
2008-10-16 11:21:30 -07:00
2008-12-10 16:30:15 -08:00
2009-01-31 00:01:11 +05:30
2008-12-08 14:31:59 +01:00
2008-10-30 19:55:00 +01:00
2008-12-31 18:07:38 -05:00
2009-01-06 11:28:07 +01:00
2009-01-31 00:01:42 +05:30
2008-11-19 18:49:57 -08:00
2009-01-14 21:05:05 -08:00
2008-11-20 04:08:29 -08:00
2008-12-15 23:38:52 -08:00
2009-01-07 17:38:31 -05:00
2008-12-23 15:21:45 -05:00
2008-12-23 15:21:56 -05:00
2009-01-31 00:02:27 +05:30
2008-12-23 15:21:37 -05:00
2008-12-23 15:21:56 -05:00
2008-12-19 15:22:54 -05:00
2009-01-06 15:59:00 -08:00
2008-11-24 18:57:41 -05:00
2009-01-31 00:15:24 +05:30
2009-01-08 16:25:18 +11:00
2008-12-21 14:21:14 +11:00
2009-01-09 15:49:06 -07:00
2008-12-04 09:16:45 -08:00
2008-11-19 16:05:00 +11:00
2009-01-07 22:48:15 +01:00
2009-01-07 09:59:50 -08:00
2009-01-08 08:31:05 -08:00
2009-01-06 15:59:07 -08:00
2009-01-04 13:33:20 -08:00
2009-01-06 15:59:00 -08:00
2008-10-16 11:21:49 -07:00
2008-10-13 10:10:37 -07:00
2009-01-09 03:39:43 -05:00
2009-02-17 16:56:31 -08:00
2009-01-07 11:13:22 -08:00
2009-01-07 11:13:11 -08:00
2009-02-04 16:58:41 -08:00
2009-01-06 17:10:04 -08:00
2009-01-15 16:39:41 -08:00
2009-01-31 00:02:54 +05:30
2008-11-28 16:24:56 -08:00
2009-01-08 08:31:12 -08:00
2009-01-08 08:31:12 -08:00
2009-01-31 00:03:40 +05:30
2009-02-10 17:18:17 -08:00
2009-01-06 10:44:29 -08:00
2009-01-06 10:44:30 -08:00
2008-10-23 00:11:07 -04:00
2009-01-06 15:59:12 -08:00
2008-12-12 17:00:07 +01:00
2009-01-04 12:17:39 +01:00
2009-01-31 00:05:30 +05:30
2008-10-23 18:54:05 +04:00
2008-10-23 08:55:01 -07:00
2008-12-20 09:15:46 +01:00
2009-01-07 21:44:20 +01:00
2009-01-07 21:44:20 +01:00
2009-01-05 08:40:25 -08:00
2009-01-16 18:02:10 +01:00
2009-01-15 16:39:41 -08:00
2009-01-05 18:31:12 -08:00
2009-01-31 00:05:59 +05:30
2008-11-12 17:17:17 -08:00
2009-01-10 06:04:33 -08:00
2009-01-01 10:12:26 +10:30
2008-11-16 19:37:55 -08:00
2008-11-16 19:39:21 -08:00
2009-01-05 10:18:08 +01:00
2008-12-18 21:56:04 +01:00
2008-10-21 07:49:04 -04:00
2008-10-16 11:21:30 -07:00
2009-01-15 16:39:37 -08:00
2008-10-30 11:38:45 -07:00
2008-12-12 14:45:25 -05:00
2008-12-30 17:31:25 -08:00
2009-01-06 15:59:28 -08:00
2009-01-06 15:59:07 -08:00
2009-01-04 13:33:20 -08:00
2008-10-16 11:21:30 -07:00
2009-01-31 00:15:57 +05:30
2009-02-11 14:04:21 +01:00
2008-11-14 10:39:18 +11:00
2009-01-07 09:58:22 +11:00
2009-02-18 15:37:53 -08:00
2009-01-02 10:19:43 -08:00
2009-01-08 16:25:18 +11:00
2009-01-02 10:19:42 -08:00
2008-11-24 11:41:38 -05:00
2009-01-31 00:06:33 +05:30
2008-12-15 23:42:33 -08:00
2009-01-27 23:48:59 +02:00
2008-12-29 11:45:47 +02:00
2008-10-22 07:00:38 -04:00
2009-01-11 03:41:58 +01:00
2008-12-10 15:12:45 -08:00
2008-11-24 21:27:22 -08:00
2009-01-31 00:07:00 +05:30
2009-02-10 00:02:54 +01:00
2009-02-09 08:15:39 -08:00
2008-11-23 11:53:50 +01:00
2009-01-05 08:40:14 +10:30
2008-11-02 10:15:07 -08:00
2009-01-27 02:15:45 -05:00
2009-01-14 19:56:50 -08:00
2009-01-08 08:31:10 -08:00
2008-12-28 09:54:52 +01:00
2009-01-31 00:07:31 +05:30
2009-02-11 14:25:36 -08:00
2008-10-16 11:21:47 -07:00
2008-10-20 08:52:42 -07:00
2008-10-16 11:21:32 -07:00
2009-01-31 00:08:18 +05:30
2008-11-11 09:30:23 -08:00
2008-10-13 09:51:40 -07:00
2008-12-30 09:05:12 +10:30
2009-01-01 10:12:25 +10:30
2008-12-31 09:53:21 +01:00
2008-11-06 08:42:48 +01:00
2009-02-18 15:37:53 -08:00
2008-12-12 17:01:38 +01:00
2008-12-19 09:21:55 +01:00
2008-11-16 09:01:36 +01:00
2009-01-02 10:19:36 -08:00
2009-01-02 10:19:40 -08:00
2009-01-07 11:27:12 -08:00
2009-01-06 10:44:44 -08:00
2009-01-07 10:00:11 -08:00
2009-01-27 16:15:36 -08:00
2008-11-24 18:57:41 -05:00
2008-12-12 13:00:06 +00:00
2009-01-31 00:09:13 +05:30
2009-01-31 00:10:11 +05:30
2009-01-02 17:11:52 -02:00
2009-01-31 00:10:59 +05:30
2008-12-30 09:26:04 +10:30
2009-01-31 00:11:25 +05:30
2009-01-31 00:12:44 +05:30
2009-01-31 00:13:08 +05:30
2008-12-30 09:25:58 +10:30
2008-12-30 09:26:03 +10:30
2009-02-18 15:37:53 -08:00
2008-10-23 17:35:04 +04:00
2008-10-13 09:51:42 -07:00
2009-02-05 12:56:48 -08:00
2009-01-07 10:00:16 -08:00
2008-11-19 14:47:04 +00:00
2009-01-26 09:47:56 -08:00
2009-01-06 15:59:09 -08:00
2008-10-28 16:01:07 -07:00