Messages in this thread | | | Date | Fri, 14 Dec 2018 11:19:59 +0100 | From | Michal Hocko <> | Subject | Re: [PATCH v2 1/1] mm, memory_hotplug: Initialize struct pages for the full memory section |
| |
[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.
-- Michal Hocko SUSE Labs
| |