[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e13eb7ca-7f2e-5bf8-1f9f-672d65d12b5e@arm.com>
Date: Thu, 17 Oct 2019 08:49:33 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>,
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>,
David Hildenbrand <david@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/page_alloc: Add alloc_contig_pages()
On 10/17/2019 06:20 AM, Mike Kravetz wrote:
> On 10/16/19 4:02 AM, Anshuman Khandual wrote:
>> HugeTLB helper alloc_gigantic_page() implements fairly generic allocation
>> method where it scans over various zones looking for a large contiguous pfn
>> range before trying to allocate it with alloc_contig_range(). Other than
>> deriving the requested order from 'struct hstate', there is nothing HugeTLB
>> specific in there. This can be made available for general use to allocate
>> contiguous memory which could not have been allocated through the buddy
>> allocator.
>>
>> alloc_gigantic_page() has been split carving out actual allocation method
>> which is then made available via new alloc_contig_pages() helper wrapped
>> under CONFIG_CONTIG_ALLOC. All references to 'gigantic' have been replaced
>> with more generic term 'contig'. Allocated pages here should be freed with
>> free_contig_range() or by calling __free_page() on each allocated page.
>
> I had a 'test harness' used when previously working on such an interface.
> It simply provides a user interface to call the allocator with random
> values for nr_pages. Several tasks are then started doing random allocations
> in parallel. The new interface is pretty straight forward, but the idea
> was to stress the underlying code. In fact, it did identify issues with
> isolation which were corrected.
>
> I exercised this new interface in the same way and am happy to report that
> no issues were detected.
Cool, thanks Mike.
Powered by blists - more mailing lists