Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-03-05 Thread David Hildenbrand
On 22.02.21 14:51, Oscar Salvador wrote: alloc_contig_range() will fail if it finds a HugeTLB page within the range, without a chance to handle them. Since HugeTLB pages can be migrated as any LRU or Movable page, it does not make sense to bail out without trying. Enable the interface to recogniz

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-28 Thread Oscar Salvador
On Fri, Feb 26, 2021 at 01:46:21PM +0100, Michal Hocko wrote: > Well, I will leave it to others. I do not feel strongly about this but > to me it makes the code harder to think about because the situation is > unstable and any of those condition can change as they are evaluated. So > an explicit ch

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-26 Thread Michal Hocko
On Fri 26-02-21 11:24:29, Oscar Salvador wrote: > On Fri, Feb 26, 2021 at 09:46:57AM +0100, Michal Hocko wrote: > > On Mon 22-02-21 14:51:37, Oscar Salvador wrote: > > [...] > > > @@ -2394,9 +2397,19 @@ bool isolate_or_dissolve_huge_page(struct page > > > *page) > > >*/ > > > if (hstate_is_g

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-26 Thread Oscar Salvador
On Fri, Feb 26, 2021 at 11:24:29AM +0100, Oscar Salvador wrote: > On Fri, Feb 26, 2021 at 09:46:57AM +0100, Michal Hocko wrote: > > On Mon 22-02-21 14:51:37, Oscar Salvador wrote: > > [...] > > > @@ -2394,9 +2397,19 @@ bool isolate_or_dissolve_huge_page(struct page > > > *page) > > >*/ > > >

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-26 Thread Oscar Salvador
On Fri, Feb 26, 2021 at 09:46:57AM +0100, Michal Hocko wrote: > On Mon 22-02-21 14:51:37, Oscar Salvador wrote: > [...] > > @@ -2394,9 +2397,19 @@ bool isolate_or_dissolve_huge_page(struct page *page) > > */ > > if (hstate_is_gigantic(h)) > > return ret; > > - > > - if (!page

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-26 Thread Michal Hocko
On Mon 22-02-21 14:51:37, Oscar Salvador wrote: [...] > @@ -2394,9 +2397,19 @@ bool isolate_or_dissolve_huge_page(struct page *page) >*/ > if (hstate_is_gigantic(h)) > return ret; > - > - if (!page_count(head) && alloc_and_dissolve_huge_page(h, head)) > +retry: > +

Re: [PATCH v3 2/2] mm: Make alloc_contig_range handle in-use hugetlb pages

2021-02-25 Thread Mike Kravetz
On 2/22/21 5:51 AM, Oscar Salvador wrote: > alloc_contig_range() will fail if it finds a HugeTLB page within the range, > without a chance to handle them. Since HugeTLB pages can be migrated as any > LRU or Movable page, it does not make sense to bail out without trying. > Enable the interface to r