Re: [PATCH v2] mm/hotplug: fix offline undo_isolate_page_range()
From: Michal Hocko
Date: Thu Mar 14 2019 - 04:22:23 EST
On Thu 14-03-19 09:09:22, Oscar Salvador wrote:
> On Wed, Mar 13, 2019 at 10:31:33AM -0400, Qian Cai wrote:
> > Also, after calling the "useless" undo_isolate_page_range() here, it
> > reaches the point of no returning by notifying MEM_OFFLINE. Those pages
> > will be marked as MIGRATE_MOVABLE again once onlining. The only thing
> > left to do is to decrease the number of isolated pageblocks zone
> > counter which would make some paths of the page allocation slower that
> > the above commit introduced. A memory block is usually at most 1GiB in
> > size, so an "int" should be enough to represent the number of pageblocks
> > in a block. Fix an incorrect comment along the way.
>
> Well, x86_64's memblocks can be up to 2GB depending on the memory we got.
> Plus the fact that alloc_contig_range can be used to isolate 16GB-hugetlb
> pages on powerpc, and that could be a lot of pageblocks.
>
> While an "int" could still hold, I think we should use "long" just to be
> more future-proof.
I would rather not touch that for now. If we really need to change the
type then do it when it is really needed. I pressume more things would
have to be changed anyway.
--
Michal Hocko
SUSE Labs