On Fri, Dec 14, 2018 at 11:19:59AM +0100, Michal Hocko wrote: >[Your From address seems to have a typo (linux.bm.com) - fixed] > >On Fri 14-12-18 10:33:55, Zaslonko Mikhail wrote: >[...] >> Yes, it might still trigger PF_POISONED_CHECK if the first page >> of the pageblock is left uninitialized (poisoned). >> But in order to cover these exceptional cases we would need to >> adjust memory_hotplug sysfs handler functions with similar >> checks (as in the for loop of memmap_init_zone()). And I guess >> that is what we were trying to avoid (adding special cases to >> memory_hotplug paths). > >is_mem_section_removable should test pfn_valid_within at least. >But that would require some care because next_active_pageblock expects >aligned pages. Ble, this code is just horrible. I would just remove it >altogether. I strongly suspect that nobody is using it for anything >reasonable anyway. The only reliable way to check whether a block is >removable is to remove it. Everything else is just racy. > Sounds reasonable. The result return from removable sysfs is transient. If no user rely on this, remove this is a better way. >-- >Michal Hocko >SUSE Labs -- Wei Yang Help you, Help me