Re: [PATCH v4 2/3] mm/hugetlb: check for reserved hugepages during memory offline

From: Michal Hocko
Date: Fri Sep 30 2016 - 02:38:27 EST


On Thu 29-09-16 10:09:37, Mike Kravetz wrote:
> On 09/29/2016 05:30 AM, Michal Hocko wrote:
> > On Mon 26-09-16 19:28:10, Gerald Schaefer wrote:
[...]
> >> Fix this by adding a return value to dissolve_free_huge_pages() and
> >> checking h->free_huge_pages vs. h->resv_huge_pages. Note that this may
> >> lead to the situation where dissolve_free_huge_page() returns an error
> >> and all free hugepages that were dissolved before that error are lost,
> >> while the memory block still cannot be set offline.
> >
> > Hmm, OK offline failure is certainly a better option than an application
> > failure.
>
> I agree.
>
> However, if the reason for the offline is that a dimm within the huge page
> is starting to fail, then one could make an argument that forced offline of
> the huge page would be more desirable. We really don't know the reason for
> the offline. So, I think the approach of this patch is best.

I though that memory which was already reported to be faulty would be
marked HWPoison and removed from the allocator. But it's been quite some
time since I've looked in that area...
--
Michal Hocko
SUSE Labs