memory_hotplug.c (2932c8b05056d4ba702f70f4deebe1c97600e62b) | memory_hotplug.c (d381c54760dcfad23743da40516e7e003d73952a) |
---|---|
1/* 2 * linux/mm/memory_hotplug.c 3 * 4 * Copyright (C) 5 */ 6 7#include <linux/stddef.h> 8#include <linux/mm.h> --- 1212 unchanged lines hidden (view full) --- 1221 if (!node_online(page_to_nid(page))) 1222 return false; 1223 1224 zone = page_zone(page); 1225 pfn = page_to_pfn(page); 1226 if (!zone_spans_pfn(zone, pfn)) 1227 return false; 1228 | 1/* 2 * linux/mm/memory_hotplug.c 3 * 4 * Copyright (C) 5 */ 6 7#include <linux/stddef.h> 8#include <linux/mm.h> --- 1212 unchanged lines hidden (view full) --- 1221 if (!node_online(page_to_nid(page))) 1222 return false; 1223 1224 zone = page_zone(page); 1225 pfn = page_to_pfn(page); 1226 if (!zone_spans_pfn(zone, pfn)) 1227 return false; 1228 |
1229 return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true); | 1229 return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, SKIP_HWPOISON); |
1230} 1231 1232/* Checks if this range of memory is likely to be hot-removable. */ 1233bool is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages) 1234{ 1235 struct page *page = pfn_to_page(start_pfn); 1236 struct page *end_page = page + nr_pages; 1237 --- 334 unchanged lines hidden (view full) --- 1572 } 1573 1574 zone = page_zone(pfn_to_page(valid_start)); 1575 node = zone_to_nid(zone); 1576 nr_pages = end_pfn - start_pfn; 1577 1578 /* set above range as isolated */ 1579 ret = start_isolate_page_range(start_pfn, end_pfn, | 1230} 1231 1232/* Checks if this range of memory is likely to be hot-removable. */ 1233bool is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages) 1234{ 1235 struct page *page = pfn_to_page(start_pfn); 1236 struct page *end_page = page + nr_pages; 1237 --- 334 unchanged lines hidden (view full) --- 1572 } 1573 1574 zone = page_zone(pfn_to_page(valid_start)); 1575 node = zone_to_nid(zone); 1576 nr_pages = end_pfn - start_pfn; 1577 1578 /* set above range as isolated */ 1579 ret = start_isolate_page_range(start_pfn, end_pfn, |
1580 MIGRATE_MOVABLE, true); | 1580 MIGRATE_MOVABLE, 1581 SKIP_HWPOISON | REPORT_FAILURE); |
1581 if (ret) { 1582 mem_hotplug_done(); 1583 reason = "failure to isolate range"; 1584 goto failed_removal; 1585 } 1586 1587 arg.start_pfn = start_pfn; 1588 arg.nr_pages = nr_pages; --- 297 unchanged lines hidden --- | 1582 if (ret) { 1583 mem_hotplug_done(); 1584 reason = "failure to isolate range"; 1585 goto failed_removal; 1586 } 1587 1588 arg.start_pfn = start_pfn; 1589 arg.nr_pages = nr_pages; --- 297 unchanged lines hidden --- |