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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBB41C433F5 for ; Wed, 15 Dec 2021 16:43:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1760D6B0071; Wed, 15 Dec 2021 11:43:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 124D46B0074; Wed, 15 Dec 2021 11:43:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0137B6B0075; Wed, 15 Dec 2021 11:43:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id E85846B0071 for ; Wed, 15 Dec 2021 11:43:38 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A42CC77989 for ; Wed, 15 Dec 2021 16:43:28 +0000 (UTC) X-FDA: 78920599296.21.33E56E8 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf15.hostedemail.com (Postfix) with ESMTP id D94FEA0013 for ; Wed, 15 Dec 2021 16:43:23 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D8BCB21112; Wed, 15 Dec 2021 16:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1639586606; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mc+NOCo8gFAcIat9O5ZbYkdJnvydq3UrnGWVFeBnwXA=; b=Q56ITFqIWCHrKTC7YasLp1lMw54M3KUsiRTZ4gfVQWE6WA7gsbGbmZDIS83d1UyQp7BvFb inU5dlvW7aiw8oavyg35HXewcF1kieK2HvzZyfwSA6FlCEsk4xaQievz7AuYFDOPU5/EPC 1kXdJZ9gMbBxP5fddEV+fUBqNNacyUQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1639586606; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mc+NOCo8gFAcIat9O5ZbYkdJnvydq3UrnGWVFeBnwXA=; b=VIiUza+iTA5qjLV6YQpqFmNZF67sEdrklSc2+Gth5pfWfwWTRaL9/3noJK1lSSyGnwvvTM ruFoHWaCX7PAG5Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8C37813B75; Wed, 15 Dec 2021 16:43:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pCmoIS4bumEIKAAAMHmgww (envelope-from ); Wed, 15 Dec 2021 16:43:26 +0000 Message-ID: <97b96d36-434e-fb4e-3e0f-7c96faa9cef9@suse.cz> Date: Wed, 15 Dec 2021 17:43:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v4 11/66] mm/mmap: Use maple tree for unmapped_area{_topdown} Content-Language: en-US To: Liam Howlett , "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton Cc: Song Liu , Davidlohr Bueso , "Paul E . McKenney" , Matthew Wilcox , Laurent Dufour , David Rientjes , Axel Rasmussen , Suren Baghdasaryan , Rik van Riel , Peter Zijlstra , Michel Lespinasse , Jerome Glisse , Minchan Kim , Joel Fernandes , Rom Lemarchand References: <20211201142918.921493-1-Liam.Howlett@oracle.com> <20211201142918.921493-12-Liam.Howlett@oracle.com> From: Vlastimil Babka In-Reply-To: <20211201142918.921493-12-Liam.Howlett@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Q56ITFqI; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=VIiUza+i; spf=pass (imf15.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Queue-Id: D94FEA0013 X-Stat-Signature: 5p1eh4j97uop8t1ciuoqzne6ugd9ejrs X-Rspamd-Server: rspam04 X-HE-Tag: 1639586603-715712 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: On 12/1/21 15:29, Liam Howlett wrote: > From: "Liam R. Howlett" > > The maple tree code was added to find the unmapped area in a previous > commit and was checked against what the rbtree returned, but the actual > result was never used. Start using the maple tree implementation and > remove the rbtree code. Nice cleanup. But... > Add kernel documentation comment for these functions. > > Signed-off-by: Liam R. Howlett > > /* Adjust search length to account for worst case alignment overhead */ > length = info->length + info->align_mask; > if (length < info->length) > return -ENOMEM; > > - rcu_read_lock(); > - mas_empty_area_rev(&mas, info->low_limit, info->high_limit - 1, > - length); > - rcu_read_unlock(); Why is RCU locking being removed as part of this? Ditton in unmapped_area_topdown()