Re: [PATCH 0/1] memory offline issues with hugepage size > memory block size

From: Gerald Schaefer
Date: Wed Sep 21 2016 - 06:35:02 EST

On Tue, 20 Sep 2016 10:45:23 -0700
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> wrote:

> On 09/20/2016 10:37 AM, Mike Kravetz wrote:
> >
> > Their approach (I believe) would be to fail the offline operation in
> > this case. However, I could argue that failing the operation, or
> > dissolving the unused huge page containing the area to be offlined is
> > the right thing to do.
> I think the right thing to do is dissolve the whole huge page if even a
> part of it is offlined. The only question is what to do with the
> gigantic remnants.

Hmm, not sure if I got this right, but I thought that by calling
update_and_free_page() on the head page (even if it is not part of the
memory block to be removed) all parts of the gigantic hugepage should be
properly freed and there should not be any remnants left.