Mel Gorman 8a942fdea5 mm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid
__early_pfn_to_nid() use static variables to cache recent lookups as
memblock lookups are very expensive but it assumes that memory
initialisation is single-threaded.  Parallel initialisation of struct
pages will break that assumption so this patch makes __early_pfn_to_nid()
SMP-safe by requiring the caller to cache recent search information.
early_pfn_to_nid() keeps the same interface but is only safe to use early
in boot due to the use of a global static variable.  meminit_pfn_in_nid()
is an SMP-safe version that callers must maintain their own state for.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Tested-by: Nate Zimmer <nzimmer@sgi.com>
Tested-by: Waiman Long <waiman.long@hp.com>
Tested-by: Daniel J Blueman <daniel@numascale.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Robin Holt <robinmholt@gmail.com>
Cc: Nate Zimmer <nzimmer@sgi.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Waiman Long <waiman.long@hp.com>
Cc: Scott Norton <scott.norton@hp.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-30 19:44:56 -07:00
..
2015-04-22 09:24:55 -07:00
2014-11-24 17:24:08 -05:00
2015-06-26 14:51:15 -07:00
2015-05-27 12:42:16 -07:00
2015-06-03 14:13:41 +09:00
2015-05-31 13:40:53 +02:00
2015-05-13 12:04:55 -05:00
2015-06-02 10:47:03 +09:00
2015-03-25 20:28:11 -04:00
2015-06-02 08:33:34 -06:00
2015-04-17 09:03:53 -04:00
2015-06-01 14:35:56 -06:00
2015-05-06 11:58:57 +01:00
2015-02-12 18:54:15 -08:00
2014-12-19 22:55:06 +01:00
2015-05-05 13:35:39 -06:00
2015-01-21 19:21:30 +01:00
2014-11-10 09:27:30 -07:00
2014-12-31 13:06:50 -05:00
2014-10-09 11:35:48 +03:00
2015-06-24 17:49:45 -07:00
2014-10-08 16:01:41 -04:00
2015-05-12 10:46:53 +02:00
2015-06-01 14:33:35 +02:00
2015-06-19 15:18:28 +02:00
2015-03-16 21:45:54 +11:00
2015-05-05 13:40:42 -06:00
2015-01-27 11:09:13 +01:00
2015-06-23 18:27:19 -07:00
2015-06-20 19:14:31 +02:00
2015-01-15 10:34:54 +01:00
2015-01-04 23:11:43 -05:00
2015-04-14 16:49:05 -07:00
2015-03-25 11:44:52 +01:00
2015-06-24 17:49:41 -07:00
2014-10-09 22:25:58 -04:00
2015-06-26 15:59:26 -07:00
2015-06-26 15:07:37 -07:00
2015-05-20 00:25:25 -07:00
2015-06-25 04:20:04 -04:00
2015-05-09 22:15:31 -04:00
2015-04-26 17:33:59 -07:00
2015-04-23 14:36:28 -04:00
2015-06-05 10:58:34 -06:00
2015-03-11 17:56:28 -04:00
2014-11-04 13:29:38 +00:00
2015-04-12 21:03:31 +02:00
2015-01-25 23:17:28 -05:00
2015-06-19 01:18:14 +02:00
2015-06-12 11:36:30 +02:00
2015-06-10 19:14:04 +08:00
2015-02-17 14:34:52 -08:00
2015-05-27 12:58:04 -07:00
2015-05-26 15:23:23 +02:00
2015-06-25 01:13:43 +02:00
2015-06-29 10:49:51 -07:00
2015-02-13 21:21:41 -08:00
2015-04-11 15:53:35 -04:00
2015-04-16 19:02:04 -04:00
2015-06-25 17:00:40 -07:00
2015-05-19 09:19:59 -06:00
2015-03-25 13:28:58 +01:00
2015-06-25 17:00:39 -07:00
2015-05-22 10:36:29 -07:00
2015-05-18 14:08:58 -07:00
2015-05-29 17:21:45 -05:00
2015-04-11 22:29:44 -04:00
2014-11-28 16:08:16 +01:00
2015-04-14 18:06:47 -07:00
2014-12-09 12:05:24 +02:00
2015-06-12 17:26:57 -07:00
2014-12-15 23:49:28 +02:00
2015-06-29 11:10:56 -07:00
2015-03-24 09:48:14 -07:00
2015-06-25 17:00:37 -07:00
2015-04-15 16:35:20 -07:00