Re: [PATCH 4/4] mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()

2021-04-09 Thread Miaohe Lin
On 2021/4/9 13:04, Andrew Morton wrote: > On Fri, 9 Apr 2021 11:17:49 +0800 Miaohe Lin wrote: > >> On 2021/4/9 7:25, Mike Kravetz wrote: >>> On 4/2/21 2:32 AM, Miaohe Lin wrote: A rare out of memory error would prevent removal of the reserve map region for a page.

Re: [PATCH 4/4] mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()

2021-04-08 Thread Andrew Morton
On Fri, 9 Apr 2021 11:17:49 +0800 Miaohe Lin wrote: > On 2021/4/9 7:25, Mike Kravetz wrote: > > On 4/2/21 2:32 AM, Miaohe Lin wrote: > >> A rare out of memory error would prevent removal of the reserve map region > >> for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid > >>

Re: [PATCH 4/4] mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()

2021-04-08 Thread Miaohe Lin
On 2021/4/9 7:25, Mike Kravetz wrote: > On 4/2/21 2:32 AM, Miaohe Lin wrote: >> A rare out of memory error would prevent removal of the reserve map region >> for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid >> dangling with incorrect counts. Unfortunately,

Re: [PATCH 4/4] mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()

2021-04-08 Thread Mike Kravetz
On 4/2/21 2:32 AM, Miaohe Lin wrote: > A rare out of memory error would prevent removal of the reserve map region > for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid > dangling with incorrect counts. Unfortunately, hugepage_subpool_get_pages > and hugetlb_acct_memory could

[PATCH 4/4] mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts()

2021-04-02 Thread Miaohe Lin
A rare out of memory error would prevent removal of the reserve map region for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid dangling with incorrect counts. Unfortunately, hugepage_subpool_get_pages and hugetlb_acct_memory could possibly fail too. We should correctly handle