diff options
-rw-r--r-- | mm/memory_hotplug.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index e62aa078f5c9..f5758b678608 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -1059,10 +1059,9 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ | |||
1059 | 1059 | ||
1060 | ret = memory_notify(MEM_GOING_ONLINE, &arg); | 1060 | ret = memory_notify(MEM_GOING_ONLINE, &arg); |
1061 | ret = notifier_to_errno(ret); | 1061 | ret = notifier_to_errno(ret); |
1062 | if (ret) { | 1062 | if (ret) |
1063 | memory_notify(MEM_CANCEL_ONLINE, &arg); | 1063 | goto failed_addition; |
1064 | return ret; | 1064 | |
1065 | } | ||
1066 | /* | 1065 | /* |
1067 | * If this zone is not populated, then it is not in zonelist. | 1066 | * If this zone is not populated, then it is not in zonelist. |
1068 | * This means the page allocator ignores this zone. | 1067 | * This means the page allocator ignores this zone. |
@@ -1080,12 +1079,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ | |||
1080 | if (need_zonelists_rebuild) | 1079 | if (need_zonelists_rebuild) |
1081 | zone_pcp_reset(zone); | 1080 | zone_pcp_reset(zone); |
1082 | mutex_unlock(&zonelists_mutex); | 1081 | mutex_unlock(&zonelists_mutex); |
1083 | printk(KERN_DEBUG "online_pages [mem %#010llx-%#010llx] failed\n", | 1082 | goto failed_addition; |
1084 | (unsigned long long) pfn << PAGE_SHIFT, | ||
1085 | (((unsigned long long) pfn + nr_pages) | ||
1086 | << PAGE_SHIFT) - 1); | ||
1087 | memory_notify(MEM_CANCEL_ONLINE, &arg); | ||
1088 | return ret; | ||
1089 | } | 1083 | } |
1090 | 1084 | ||
1091 | zone->present_pages += onlined_pages; | 1085 | zone->present_pages += onlined_pages; |
@@ -1118,6 +1112,13 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ | |||
1118 | if (onlined_pages) | 1112 | if (onlined_pages) |
1119 | memory_notify(MEM_ONLINE, &arg); | 1113 | memory_notify(MEM_ONLINE, &arg); |
1120 | return 0; | 1114 | return 0; |
1115 | |||
1116 | failed_addition: | ||
1117 | pr_debug("online_pages [mem %#010llx-%#010llx] failed\n", | ||
1118 | (unsigned long long) pfn << PAGE_SHIFT, | ||
1119 | (((unsigned long long) pfn + nr_pages) << PAGE_SHIFT) - 1); | ||
1120 | memory_notify(MEM_CANCEL_ONLINE, &arg); | ||
1121 | return ret; | ||
1121 | } | 1122 | } |
1122 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 1123 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
1123 | 1124 | ||
@@ -1529,8 +1530,7 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) | |||
1529 | 1530 | ||
1530 | } else { | 1531 | } else { |
1531 | #ifdef CONFIG_DEBUG_VM | 1532 | #ifdef CONFIG_DEBUG_VM |
1532 | printk(KERN_ALERT "removing pfn %lx from LRU failed\n", | 1533 | pr_alert("removing pfn %lx from LRU failed\n", pfn); |
1533 | pfn); | ||
1534 | dump_page(page, "failed to remove from LRU"); | 1534 | dump_page(page, "failed to remove from LRU"); |
1535 | #endif | 1535 | #endif |
1536 | put_page(page); | 1536 | put_page(page); |
@@ -1858,7 +1858,7 @@ repeat: | |||
1858 | ret = -EBUSY; | 1858 | ret = -EBUSY; |
1859 | goto failed_removal; | 1859 | goto failed_removal; |
1860 | } | 1860 | } |
1861 | printk(KERN_INFO "Offlined Pages %ld\n", offlined_pages); | 1861 | pr_info("Offlined Pages %ld\n", offlined_pages); |
1862 | /* Ok, all of our target is isolated. | 1862 | /* Ok, all of our target is isolated. |
1863 | We cannot do rollback at this point. */ | 1863 | We cannot do rollback at this point. */ |
1864 | offline_isolated_pages(start_pfn, end_pfn); | 1864 | offline_isolated_pages(start_pfn, end_pfn); |
@@ -1895,9 +1895,9 @@ repeat: | |||
1895 | return 0; | 1895 | return 0; |
1896 | 1896 | ||
1897 | failed_removal: | 1897 | failed_removal: |
1898 | printk(KERN_INFO "memory offlining [mem %#010llx-%#010llx] failed\n", | 1898 | pr_debug("memory offlining [mem %#010llx-%#010llx] failed\n", |
1899 | (unsigned long long) start_pfn << PAGE_SHIFT, | 1899 | (unsigned long long) start_pfn << PAGE_SHIFT, |
1900 | ((unsigned long long) end_pfn << PAGE_SHIFT) - 1); | 1900 | ((unsigned long long) end_pfn << PAGE_SHIFT) - 1); |
1901 | memory_notify(MEM_CANCEL_OFFLINE, &arg); | 1901 | memory_notify(MEM_CANCEL_OFFLINE, &arg); |
1902 | /* pushback to free area */ | 1902 | /* pushback to free area */ |
1903 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); | 1903 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); |