On Tue 15-10-19 15:27:46, Anshuman Khandual wrote: > > > On 10/14/2019 10:22 PM, Mike Kravetz wrote: > > On 10/14/19 6:08 AM, Anshuman Khandual wrote: > >> On 10/14/2019 06:30 PM, Michal Hocko wrote: > >>> > >>> OK, thanks for the clarification. This all means that this patch is not > >>> the right approach. If you need a more generic alloc_contig_range then > >>> add it to page_alloc.c and make it completely independent on the hugetlb > >>> config and the code. Hugetlb allocator can reuse that helper. > > > > Should we revisit this previous attempt at such an interface? > > > > https://lkml.org/lkml/2018/4/16/1072 > > > > This looks like another use case. > > > > The current proposal [v6] does not go far enough to unify all callers > of alloc_contig_range() looking for contiguous pages of certain size, > but instead it just tries not to duplicate HugeTLB gigantic allocation > code in the test case for it's purpose. Please go and extract that functionality to a commonly usable helper. Dependency on hugetlb is just ugly as hell. -- Michal Hocko SUSE Labs