Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1001660lqt; Tue, 19 Mar 2024 09:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtcLmfl3tqZYE3TlV8awaZUZZZGuGLfWiEvY3ID5NdU25GctYbqSg6WQbZvLEh3osFiPquBBzTHjpWCpTTo7ziV2jCX1R9+iQrRSfGHw== X-Google-Smtp-Source: AGHT+IFM0+cht3V8n0KChwd0jly3usXtzmkUAPWAuOA+q/qhbPB8FvvjgtDd0FKliT59GAfFrkgb X-Received: by 2002:a05:6a21:920b:b0:1a3:63f5:5739 with SMTP id tl11-20020a056a21920b00b001a363f55739mr4830480pzb.0.1710867144563; Tue, 19 Mar 2024 09:52:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710867144; cv=pass; d=google.com; s=arc-20160816; b=FTs+BhdTXC7taHOiIu0HeR4aoZMHmWqdX7BrFm6+3Yg2ZIz239ZP5jSfg/j9WBt0vF MsjNcd9fc72WbjFze4ya+4GZz0SmnoRw2ctNkJo4S0DGbxhG4sBHuejrAy7XP1vjlEUT tLhiR1Jrx9QZmg2VU8lHIoQk2o/652dmn5V3k8w/+BAo9nJumUC6vH72euxvXnW5y7qI EG6zg5l9gPLrFqItWOG3hRYRS7716hD+/sqWRTDs5rxfe50ZExaKfqEGkxmyNPXYuEii 86u0NbMDZtGnqVzzS446xfpmqd6ZKj6ObuWMMt0DhVK21lq4zYKv1GAJ5ZcmthtbkJY3 byYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KizDvAs4Yj6RxJgCz75yX4yH1t6QiF+D0on+mjFBcMY=; fh=/CXW8othc9vUVuQUIDldUW1M5KhzEsnAKgjh+tGIJew=; b=ACzhKI37ep12yLDqf5JJkYnXcTAqkt/bQg+w8YMygU50Br6bHnbU6VgiMrlO7sTQfO Dzm7hrjAPQRuFB8+n8Nu6BUqNjmaPbNx40QIDVS6Ezrl6rz3z7Ck6cafVKfUP5+XyVwh 1QQ5+DDPxR3HwoZshJobw2z83cri6Je9oa/E7neG0wIkWa9BgKkAeDgW4FnGFADfRat6 ty6D2DNBzCv4T/wS7vkLNqqOZSZLF+BOPdorLADNsfbD5nmuk6bSu4KXymGsyHskSNkZ YBXYPXU30JVfDqkO5meSnxK/dKpO6QwimX5qIx+1d2ao/69i9nWcw6jegiGl0y2LCRXy s2KQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wD95Toxi; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107867-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107867-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f12-20020a63f10c000000b005dbde399b23si10048468pgi.901.2024.03.19.09.52.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107867-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wD95Toxi; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107867-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107867-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3EE12285CB7 for ; Tue, 19 Mar 2024 16:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66BD8225D0; Tue, 19 Mar 2024 16:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="wD95Toxi" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A8E2208D4 for ; Tue, 19 Mar 2024 16:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710867130; cv=none; b=c4BIOn1vku8kVFxx0tjWUSDL0g/ZqPvFcDhYb6+FPntzmDFjZteTBsb3Mt87b8zxmyhKqZMV4mwy0mZD2SZxowj5X44d00g3gOLBJ4Hnb7OS/891JXjF784R2WxtuE9/2awv2aGzhvNNVt3TNywaTegKdlVvcygqL/WO1iprdFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710867130; c=relaxed/simple; bh=U32m0SI2gfRENrFvT0P56oJ6rRLJh2vh1fMh73Zm0gw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eVPCmd5ENChCxzE70I7Cl0NixffkJfxW8dllX4WgbEM44dtBZ+DSPTW9q/QnCl5n0Q4+mzrbme4wqzTrQsKMwPIFUHCwqjXwm53a9wxDPFVIV8+C0yM6ggVV3PPZvMU0WxSeLJtY0+9M3p32qZwVjtHlyYFmjX2oZpKu4F+3UXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=wD95Toxi; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KizDvAs4Yj6RxJgCz75yX4yH1t6QiF+D0on+mjFBcMY=; b=wD95Toxi1mDsNY0oD6zGhWEqfA yR53icSHH734mg06hn3pofuf2It8H0/ljVmyc8VHn+6XWTokNP+4yiQ1vx23/U0AOUX38+kkKPpkE SiLb8NYFoZjcUXns5b8dAdi1G7wdigyDJSemyHlICDV/Du92a4dY/4EGtt950HQgQI44WrK7QNXXS NSeIUljFahH2pYbnISnSPy1p6oXxSzy36iTTqGuBCL6hIMhEKORNWV3pzCwAmK6UzHz5Q1XVVeX5m if039kC4j5ZITVbAwjF4WIimhaTPx+qTuN+K7Gn8RPpLLpbuX/q5MopitPqIBnxYu61nbtfDlMMOu DcIl/XRQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmch0-00000002LeJ-0ltl; Tue, 19 Mar 2024 16:52:02 +0000 Date: Tue, 19 Mar 2024 16:52:02 +0000 From: Matthew Wilcox To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] lib/xarray: introduce a new helper xas_get_order Message-ID: References: <20240319092733.4501-1-ryncsn@gmail.com> <20240319092733.4501-4-ryncsn@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240319092733.4501-4-ryncsn@gmail.com> On Tue, Mar 19, 2024 at 05:27:32PM +0800, Kairui Song wrote: > From: Kairui Song > > It can be used after xas_load to check the order of loaded entries. > Compared to xa_get_order, it saves an XA_STATE and avoid a rewalk. > > Signed-off-by: Kairui Song Brilliant; yes. I was just looking at this the other day and wondering why I hadn't done this. Acked-by: Matthew Wilcox (Oracle) > +EXPORT_SYMBOL(xas_get_order); We don't have a module user yet, so I'd hold off on this. It's an unusual thing to want to do, and we may never have a modular user. Also, xas functions are EXPORT_SYMBOL_GPL, not EXPORT_SYMBOL.