Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-07 Thread Michal Hocko
On Tue 06-04-21 09:49:13, Mike Kravetz wrote: > On 4/6/21 2:56 AM, Michal Hocko wrote: > > On Mon 05-04-21 16:00:39, Mike Kravetz wrote: [...] > >> @@ -2298,6 +2312,7 @@ static int alloc_and_dissolve_huge_page(struct > >> hstate *h, struct page *old_page, > >>/* > >> *

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Mike Kravetz
On 4/6/21 6:41 AM, Oscar Salvador wrote: > On Mon, Apr 05, 2021 at 04:00:39PM -0700, Mike Kravetz wrote: >> +static void remove_hugetlb_page(struct hstate *h, struct page *page, >> +bool adjust_surplus) >> +{ >> +int nid = page_to_nid(page);

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Oscar Salvador
On 2021-04-06 18:49, Mike Kravetz wrote: Andrew, can we make this happen? It would require removing Oscar's series until it can be modified to work on top of this. There is only one small issue with this series as it originally went into mmotm. There is a missing conversion of spin_lock to

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Mike Kravetz
On 4/6/21 2:56 AM, Michal Hocko wrote: > On Mon 05-04-21 16:00:39, Mike Kravetz wrote: >> The new remove_hugetlb_page() routine is designed to remove a hugetlb >> page from hugetlbfs processing. It will remove the page from the active >> or free list, update global counters and set the compound

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Oscar Salvador
On Mon, Apr 05, 2021 at 04:00:39PM -0700, Mike Kravetz wrote: > The new remove_hugetlb_page() routine is designed to remove a hugetlb > page from hugetlbfs processing. It will remove the page from the active > or free list, update global counters and set the compound page > destructor to NULL so

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Oscar Salvador
On Mon, Apr 05, 2021 at 04:00:39PM -0700, Mike Kravetz wrote: > +static void remove_hugetlb_page(struct hstate *h, struct page *page, > + bool adjust_surplus) > +{ > + int nid = page_to_nid(page); > + > + if (hstate_is_gigantic(h) &&

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Oscar Salvador
On Tue, Apr 06, 2021 at 11:56:11AM +0200, Michal Hocko wrote: > Btw. I would prefer to reverse the ordering of this and Oscar's > patchset. This one is a bug fix which might be interesting for stable > backports while Oscar's work can be looked as a general functionality > improvement. If it

Re: [PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-06 Thread Michal Hocko
On Mon 05-04-21 16:00:39, Mike Kravetz wrote: > The new remove_hugetlb_page() routine is designed to remove a hugetlb > page from hugetlbfs processing. It will remove the page from the active > or free list, update global counters and set the compound page > destructor to NULL so that PageHuge()

[PATCH v4 4/8] hugetlb: create remove_hugetlb_page() to separate functionality

2021-04-05 Thread Mike Kravetz
The new remove_hugetlb_page() routine is designed to remove a hugetlb page from hugetlbfs processing. It will remove the page from the active or free list, update global counters and set the compound page destructor to NULL so that PageHuge() will return false for the 'page'. After this call, the