• David Hildenbrand's avatar
    mm/memory_hotplug: simplify page onlining · aac65321
    David Hildenbrand authored
    We don't allow to offline memory with holes, all boot memory is online,
    and all hotplugged memory cannot have holes.
    
    We can now simplify onlining of pages.  As we only allow to online/offline
    full sections and sections always span full MAX_ORDER_NR_PAGES, we can
    just process MAX_ORDER - 1 pages without further special handling.
    
    The number of onlined pages simply corresponds to the number of pages we
    were requested to online.
    
    While at it, refine the comment regarding the callback not exposing all
    pages to the buddy.
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
    Acked-by: default avatarMichal Hocko <mhocko@suse.com>
    Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
    Cc: Charan Teja Reddy <charante@codeaurora.org>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Logan Gunthorpe <logang@deltatee.com>
    Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Tony Luck <tony.luck@intel.com>
    Link: https://lkml.kernel.org/r/20200819175957.28465-8-david@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    aac65321
memory_hotplug.c 49 KB