• Zhang Zhen's avatar
    memory-hotplug: add sysfs valid_zones attribute · ed2f2400
    Zhang Zhen authored
    Currently memory-hotplug has two limits:
    
    1. If the memory block is in ZONE_NORMAL, you can change it to
       ZONE_MOVABLE, but this memory block must be adjacent to ZONE_MOVABLE.
    
    2. If the memory block is in ZONE_MOVABLE, you can change it to
       ZONE_NORMAL, but this memory block must be adjacent to ZONE_NORMAL.
    
    With this patch, we can easy to know a memory block can be onlined to
    which zone, and don't need to know the above two limits.
    
    Updated the related Documentation.
    
    [akpm@linux-foundation.org: use conventional comment layout]
    [akpm@linux-foundation.org: fix build with CONFIG_MEMORY_HOTREMOVE=n]
    [akpm@linux-foundation.org: remove unused local zone_prev]
    Signed-off-by: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Toshi Kani <toshi.kani@hp.com>
    Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
    Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Wang Nan <wangnan0@huawei.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ed2f2400
memory_hotplug.c 50.8 KB