memory_hotplug.c (809c444977adb7313e0612e9e3af4b73ba3f5746) | memory_hotplug.c (f3ab2636c5c1dd9ab0ff53a46d8354d5769ffdd4) |
---|---|
1/* 2 * linux/mm/memory_hotplug.c 3 * 4 * Copyright (C) 5 */ 6 7#include <linux/stddef.h> 8#include <linux/mm.h> --- 691 unchanged lines hidden (view full) --- 700 printk(KERN_ALERT "removing pfn %lx from LRU failed\n", 701 pfn); 702 dump_page(page); 703#endif 704 /* Becasue we don't have big zone->lock. we should 705 check this again here. */ 706 if (page_count(page)) { 707 not_managed++; | 1/* 2 * linux/mm/memory_hotplug.c 3 * 4 * Copyright (C) 5 */ 6 7#include <linux/stddef.h> 8#include <linux/mm.h> --- 691 unchanged lines hidden (view full) --- 700 printk(KERN_ALERT "removing pfn %lx from LRU failed\n", 701 pfn); 702 dump_page(page); 703#endif 704 /* Becasue we don't have big zone->lock. we should 705 check this again here. */ 706 if (page_count(page)) { 707 not_managed++; |
708 ret = -EBUSY; |
|
708 break; 709 } 710 } 711 } | 709 break; 710 } 711 } 712 } |
712 ret = -EBUSY; 713 if (not_managed) { 714 if (!list_empty(&source)) | 713 if (!list_empty(&source)) { 714 if (not_managed) { |
715 putback_lru_pages(&source); | 715 putback_lru_pages(&source); |
716 goto out; | 716 goto out; 717 } 718 /* this function returns # of failed pages */ 719 ret = migrate_pages(&source, hotremove_migrate_alloc, 0, 1); 720 if (ret) 721 putback_lru_pages(&source); |
717 } | 722 } |
718 ret = 0; 719 if (list_empty(&source)) 720 goto out; 721 /* this function returns # of failed pages */ 722 ret = migrate_pages(&source, hotremove_migrate_alloc, 0, 1); 723 if (ret) 724 putback_lru_pages(&source); 725 | |
726out: 727 return ret; 728} 729 730/* 731 * remove from free_area[] and mark all as Reserved. 732 */ 733static int --- 182 unchanged lines hidden --- | 723out: 724 return ret; 725} 726 727/* 728 * remove from free_area[] and mark all as Reserved. 729 */ 730static int --- 182 unchanged lines hidden --- |