[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe8cae46-6bd8-88eb-d3fe-2740bb79ee58@redhat.com>
Date: Wed, 16 Oct 2019 14:29:05 +0200
From: David Hildenbrand <david@...hat.com>
To: Michal Hocko <mhocko@...nel.org>,
Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-mm@...ck.org, Mike Kravetz <mike.kravetz@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
David Rientjes <rientjes@...gle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
Mel Gorman <mgorman@...hsingularity.net>,
Mike Rapoport <rppt@...ux.ibm.com>,
Dan Williams <dan.j.williams@...el.com>,
Pavel Tatashin <pavel.tatashin@...rosoft.com>,
Matthew Wilcox <willy@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/page_alloc: Add alloc_contig_pages()
On 16.10.19 13:51, Michal Hocko wrote:
> On Wed 16-10-19 16:43:57, Anshuman Khandual wrote:
>>
>>
>> On 10/16/2019 04:39 PM, David Hildenbrand wrote:
> [...]
>>> Just to make sure, you ignored my comment regarding alignment
>>> although I explicitly mentioned it a second time? Thanks.
>>
>> I had asked Michal explicitly what to be included for the respin. Anyways
>> seems like the previous thread is active again. I am happy to incorporate
>> anything new getting agreed on there.
>
> Your patch is using the same alignment as the original code would do. If
> an explicit alignement is needed then this can be added on top, right?
>
Again, the "issue" I see here is that we could now pass in numbers that
are not a power of two. For gigantic pages it was clear that we always
have a number of two. The alignment does not make any sense otherwise.
What I'm asking for is
a) Document "The resulting PFN is aligned to nr_pages" and "nr_pages
should be a power of two".
b) Eventually adding something like
if (WARN_ON_ONCE(!is_power_of_2(nr_pages)))
return NULL;
Once we need other granularities we can think about the alignment and an
optimized search-process.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists