mm, memory_hotplug: consider offline memblocks removable
authorMichal Hocko <[email protected]>
Thu, 6 Jul 2017 22:37:53 +0000 (15:37 -0700)
committerLinus Torvalds <[email protected]>
Thu, 6 Jul 2017 23:24:32 +0000 (16:24 -0700)
commit8b0662f245a328df8873be949b0087760420f40c
tree8ab1d33d6cb8bf5ee1b9c1a75914b257bcc96e54
parent9037a9934349b0e180896fc8cacaf1819418ba03
mm, memory_hotplug: consider offline memblocks removable

is_pageblock_removable_nolock() relies on having zone association to
examine all the page blocks to check whether they are movable or free.
This is just wasting of cycles when the memblock is offline.  Later
patch in the series will also change the time when the page is
associated with a zone so we let's bail out early if the memblock is
offline.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Reported-by: Igor Mammedov <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Daniel Kiper <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Reza Arbab <[email protected]>
Cc: Tobias Regnery <[email protected]>
Cc: Toshi Kani <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: Xishi Qiu <[email protected]>
Cc: Yasuaki Ishimatsu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/memory.c