Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2314056pxa; Mon, 24 Aug 2020 10:38:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlY43OlDuz62McJa9Hq9WNrzxdXApCocB0mdA7wugeIfL+CrmLS5u5PUNvLd/cnQW8dha0 X-Received: by 2002:a05:6402:785:: with SMTP id d5mr6568842edy.370.1598290699113; Mon, 24 Aug 2020 10:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598290699; cv=none; d=google.com; s=arc-20160816; b=Z4a29rxmigBRlTBAxZFKbn8+FHwLHuC6Yz2HkmfuY6sQituC88DKQduZ1u481rfWHc htWSpVSG6IZyWfGDV4n3YZ7/N9ZOT4XN1Lc/7l80PRxHIVkvW0f6D8DSYeEeGmEXi5XN y81WRMxgRZiJg8Ka/ox6kSOjwdmuXn6s5bQh/zGTr2NwImBEc61IRMzMkRhtVLwjGIZ3 DNk88YK5oc7eD3NDK6iJSGAT9Iz10z6y5m/k40gF1ZNec9H5bUjyHnB4UW91L+ZIhh+q XBpaUKFIkYCcDW10g/93xte+JrbtLjnNibOGWYzHw1fdc+NVIgdWvg2vamRnqdlkWykU goJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PDGpX/gLn6F/h8sTkr6/xtJftCfZUJ0TMwjy5eqECbw=; b=R6q4wsQ3iICijV/IWmRNz7OQ3L/tDPbQ4dns9lXtNnPeEpYgG3t3atHBI6KqZehGrq FQvD5RtwswB9jvB6IziJZTh5hHJHx4RQM5q54+kifme/eHWxBqu3/GCFioyY2+nxguEU Psg/V7ZF7cAwnYPxWfa4JYN7Nc+7LulRPs92f4kw9iGl6Yk26QROm8YMnDO8h1K+Nq2b JFyXyRtPxJCPjElfGABqehtaXDSadN/g7gsVbgOWeCMC/mEjEgL9y15oRUOG7g+Wmqzg 9I6FZFAdn+H19jZWfCcYJK5Ol2Reow+Q/uzqvHOTcEegyrd4AScc553zJp6DE4VK7bta tC7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=EflxfCon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt21si8128328ejc.664.2020.08.24.10.37.56; Mon, 24 Aug 2020 10:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=EflxfCon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726828AbgHXRg6 (ORCPT + 99 others); Mon, 24 Aug 2020 13:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgHXRgq (ORCPT ); Mon, 24 Aug 2020 13:36:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03114C061573 for ; Mon, 24 Aug 2020 10:36:45 -0700 (PDT) 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=PDGpX/gLn6F/h8sTkr6/xtJftCfZUJ0TMwjy5eqECbw=; b=EflxfCon92BXdyEpHqw0j6BRKB kHi1RfocRHJrsGcFweJYVWk1o8lsW3K+xRkyZRTDbZ4K1RcSRWQElpDgwAJsJndV0PRfjhdTnT5e1 Z2R2bc9dUvv5a+bBZmqdI1FBJsLI36RsUiBo2mEWrU4jJwrl7I5jgj12xCCa42ItzmkhozXwebjRi 5Ymj7UAF354UfSMh2mUB4v1cVVXDlM8U5BwnffhxApZ76471ZKtO3M1I0Z0OiS+L42gP4hHGVwYLz 4MXysnyDzjjdB4x+71CKqGrCC/s+x8vVIEmtS/lMJPz/VDfFsxw1UVWFTJKz0m4OqFMTnWXCe5Hum SOLhP7JQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAGOe-0006CA-2D; Mon, 24 Aug 2020 17:36:40 +0000 Date: Mon, 24 Aug 2020 18:36:39 +0100 From: Matthew Wilcox To: Jan Kara Cc: linux-mm@kvack.org, Andrew Morton , Hugh Dickins , William Kucharski , Johannes Weiner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] mm: Pass pvec directly to find_get_entries Message-ID: <20200824173639.GD17456@casper.infradead.org> References: <20200819150555.31669-1-willy@infradead.org> <20200819150555.31669-7-willy@infradead.org> <20200824161620.GK24877@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200824161620.GK24877@quack2.suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 24, 2020 at 06:16:20PM +0200, Jan Kara wrote: > On Wed 19-08-20 16:05:54, Matthew Wilcox (Oracle) wrote: > > All callers of find_get_entries() use a pvec, so pass it directly > > instead of manipulating it in the caller. > > > > Signed-off-by: Matthew Wilcox (Oracle) > > Rather than passing pvec to find_get_entries() and then making everybody > use it, won't it more consistent WRT the naming to make everybody use > pagevec_lookup_entries() (which is trivial at this point in the series) and > then rename find_get_entries() to pagevec_lookup_entries()? I.e., I'd prefer > if the final function was called pagevec_lookup_entries() because that is > IMO more consistent with how other functions are named in this area... It seemed more consistent to me to have everybody using find_get_entries(). To me the pagevec functions: 1. Are in mm/swap.c (not really sure why) 2. Take pvec as the first argument, not the last 3. Wrap a find_* function Whereas the find_* functions: 1. Are in mm/filemap.c 2. Take mapping as the first argument 3. Manipulate the XArray directly We already have functions in filemap which take a pagevec, eg page_cache_delete_batch() and delete_from_page_cache_batch(). So if we're going to merge the two functions, it seems more natural to have it in filemap.c and called find_get_entries(), but I'm definitely open to persuasion on this!