Re: [PATCH v1 2/5] mm/memory_hotplug: enforce section alignment when onlining/offlining
From: Oscar Salvador <hidden>
Date: 2018-08-16 12:34:38
Also in:
lkml
From: Oscar Salvador <hidden>
Date: 2018-08-16 12:34:38
Also in:
lkml
On Thu, Aug 16, 2018 at 12:06:25PM +0200, David Hildenbrand wrote:
onlining/offlining code works on whole sections, so let's enforce that. Existing code only allows to add memory in memory block size. And only whole memory blocks can be onlined/offlined. Memory blocks are always aligned to sections, so this should not break anything. online_pages/offline_pages will implicitly mark whole sections online/offline, so the code really can only handle such granularities. (especially offlining code cannot deal with pageblock_nr_pages but theoretically only MAX_ORDER-1) Signed-off-by: David Hildenbrand <redacted>
Hi David, If you are really willing to move the checks from this patch[1] to online/offline_pages, you might consider to put that in as well. So we have a function that checks for everything, and not multiple checks. Another thing is that I would have prefered to take the checks up to memory_block_action, but offline_pages gets also called from ppc-memtrace code. Other than that, Reviewed-by: Oscar Salvador <osalvador@suse.de> [1] https://patchwork.kernel.org/patch/10567277/ Thanks -- Oscar Salvador SUSE L3