mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
memory hotplug: Hot-add with sparsemem-vmemmap
This patch is to avoid panic when memory hot-add is executed with
sparsemem-vmemmap. Current vmemmap-sparsemem code doesn't support memory
hot-add. Vmemmap must be populated when hot-add. This is for
2.6.23-rc2-mm2.
Todo: # Even if this patch is applied, the message "[xxxx-xxxx] potential
offnode page_structs" is displayed. To allocate memmap on its node,
memmap (and pgdat) must be initialized itself like chicken and
egg relationship.
# vmemmap_unpopulate will be necessary for followings.
- For cancel hot-add due to error.
- For unplug.
Signed-off-by: Yasunori Goto <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
48e94196a5
commit
98f3cfc1dc
3 changed files with 24 additions and 5 deletions
|
|
@ -137,7 +137,7 @@ int __meminit vmemmap_populate_basepages(struct page *start_page,
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct page __init *sparse_early_mem_map_populate(unsigned long pnum, int nid)
|
||||
struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid)
|
||||
{
|
||||
struct page *map = pfn_to_page(pnum * PAGES_PER_SECTION);
|
||||
int error = vmemmap_populate(map, PAGES_PER_SECTION, nid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue