From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B12BC433DB for ; Tue, 12 Jan 2021 21:06:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 76CB623125 for ; Tue, 12 Jan 2021 21:06:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76CB623125 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C26C26B00DC; Tue, 12 Jan 2021 16:06:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD6D96B00DE; Tue, 12 Jan 2021 16:06:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A77B56B00DF; Tue, 12 Jan 2021 16:06:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 8FDE76B00DC for ; Tue, 12 Jan 2021 16:06:23 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 54260824556B for ; Tue, 12 Jan 2021 21:06:23 +0000 (UTC) X-FDA: 77698356246.21.print27_2b02e9427518 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 2EA00180442C7 for ; Tue, 12 Jan 2021 21:06:23 +0000 (UTC) X-HE-Tag: print27_2b02e9427518 X-Filterd-Recvd-Size: 3939 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 21:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=kkPWkBZZqKOkMG5EsadJckZcviV2Ah0ETqTE46n08Fs=; b=AODIvpRTi6q3I2oBZKuKRdLtHw I+faK5Pduucju5JdH5XfgbkwbI1/HApFDJOqdW4lyx8zTU1oxFkFdlGBGyDNgkdjy9dBu12KRMDLz 1mhWZ32I2BynJns9Z6PxWkID8W2xDuX0T+mi+n4UERH0Ou/eR7yODt0xs0S1rUXnBrXVhHIcyfixZ 6LZAcQcsKmI0cmyHl228nDS4XKT7JsLh13nW5YIXQgWRSSziWXYIPn2uUfmil0/InguXTjGZcvFte sphYqKiMPahvgztNzc49Zq6fQyT6NcsNJkRyGk7PlrpiYRLiN9XUD8D5VUxAdTqlHxSbLHroQnRJR MSltvrgw==; Received: from [2601:1c0:6280:3f0::79df] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzQrd-0002cC-Gq; Tue, 12 Jan 2021 21:06:05 +0000 Subject: Re: [PATCH v2 10/70] mm/mmap: Change unmapped_area and unmapped_area_topdown to use maple tree To: "Liam R. Howlett" , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Andrew Morton , Song Liu , Davidlohr Bueso , "Paul E . McKenney" , Matthew Wilcox , Jerome Glisse , David Rientjes , Axel Rasmussen , Suren Baghdasaryan , Vlastimil Babka , Rik van Riel , Peter Zijlstra References: <20210112161240.2024684-1-Liam.Howlett@Oracle.com> <20210112161240.2024684-11-Liam.Howlett@Oracle.com> From: Randy Dunlap Message-ID: <477569cb-3762-ff89-52b3-10e9cc62f417@infradead.org> Date: Tue, 12 Jan 2021 13:05:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210112161240.2024684-11-Liam.Howlett@Oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: one copy-pasta error below: On 1/12/21 8:11 AM, Liam R. Howlett wrote: > Use the new maple tree data structure to find an unmapped area. > > Signed-off-by: Liam R. Howlett > --- > mm/mmap.c | 249 ++++++------------------------------------------------ > 1 file changed, 27 insertions(+), 222 deletions(-) > > diff --git a/mm/mmap.c b/mm/mmap.c > index f123f9c97dfe8..3b3084ee309b7 100644 > --- a/mm/mmap.c > +++ b/mm/mmap.c > @@ -2040,260 +2040,65 @@ unsigned long mmap_region(struct file *file, unsigned long addr, > return error; > } > > +/* unmapped_area() Find an area between the low_limit and the high_limit with > + * the correct alignment and offset, all from @info. Note: current->mm is used > + * for the search. > + * > + * @info: The unmapped area information including the range (low_limit - > + * hight_limit), the alignment offset and mask. > + * > + * Return: A memory address or -ENOMEM. > + */ > static unsigned long unmapped_area(struct vm_unmapped_area_info *info) > { ... > } > > +/* unmapped_area() Find an area between the low_limit and the high_limit with s/unmapped_area/unmapped_area_topdown/ > + * the correct alignment and offset at the highest available address, all from > + * @info. Note: current->mm is used for the search. > + * > + * @info: The unmapped area information including the range (low_limit - > + * hight_limit), the alignment offset and mask. > + * > + * Return: A memory address or -ENOMEM. > + */ > static unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) > { thanks. -- ~Randy