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=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 45D63C433E1 for ; Mon, 24 Aug 2020 17:36:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0828020702 for ; Mon, 24 Aug 2020 17:36:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EflxfCon" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0828020702 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 983C88D0001; Mon, 24 Aug 2020 13:36:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 935586B0008; Mon, 24 Aug 2020 13:36:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 87B406B0006; Mon, 24 Aug 2020 13:36:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id 708B06B0006 for ; Mon, 24 Aug 2020 13:36:44 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C759A180AD817 for ; Mon, 24 Aug 2020 17:36:43 +0000 (UTC) X-FDA: 77186167086.15.pail53_40007e427055 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 9829A1814B0C8 for ; Mon, 24 Aug 2020 17:36:43 +0000 (UTC) X-HE-Tag: pail53_40007e427055 X-Filterd-Recvd-Size: 3217 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 17:36:42 +0000 (UTC) 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> X-Rspamd-Queue-Id: 9829A1814B0C8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 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!