Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10783480rwl; Thu, 12 Jan 2023 02:28:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXsMXzqg/s2Zzl+UmTIXOKAR3RNY2A/L7Fc+trwkWhDedw3YjjVpbfi41I+eBtQqa00iOBeW X-Received: by 2002:a17:902:d2cc:b0:189:9a71:10a5 with SMTP id n12-20020a170902d2cc00b001899a7110a5mr7901006plc.5.1673519307249; Thu, 12 Jan 2023 02:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673519307; cv=none; d=google.com; s=arc-20160816; b=YwLup/UkmFnWUW0hPJooW7M+0FB+SpHtQ/S7PcfKxYhIk0TeUvNut4+pNx5WQALU+v mdPKLQHvb55U87kQOxVrzobzyTfuinUJmpfGqUQovB+wwcDR4S2ouOp2Z2dXRmonCQJd ZIQJsygYt41/qt2QF08FH3WOBeyh43zOCjeZG46F6JVRlFFSTHkvWdz/h64PqD3mAqGO 4azh31UW7fFJM1IDR3CflDe/YQseXGhl5sgT9eY+BMQA9fklvsu7dcXSGPM4bvdE3L8G Hdxo1VnXDnNRnUJvZt1/zEMeGc1y7H4B5PQ8PdJZ4ixdjfhxvuMWZVuNA0H075i1hadM MRqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=yRCSQFW44Cc2tUnJiTmVd65jIs6fvgvwHYQz2Hxv9FI=; b=KZ7OodU19QBfBnFPTftkuQ+JHyku2AX0f6FDSijyn6meiiBveMQB3bkXxpwd/sjPxF 6CK//YHaAWD0joOv2RjMpBDNKb2hDwubnlCdDLHHRXk3+lJyLWXbpuSXXLEJdyUjPRDe WfSeghr20UyozozKw+6bHtvlicC1BquutTB2m2UMUJTZR1NdTKxKMeXPjiBWnArjBJ+M tZQ+KZtymzu9g595JRd9HGOzVXRSpW+vKSVIRDuqhPyuvhDOSFcmAoaTYiA4xfyKhghS suNK8P++AHavdSV4Z64GX9i4DUGu7cP46EpybTgnuptvTogmOSxhZRyTmtcnVKVZYxVo Bv1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=rIRFn+Xb; dkim=neutral (no key) header.i=@suse.cz header.b="H9MiK/DY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020a63f95a000000b004a46963e2b7si16640804pgk.313.2023.01.12.02.28.20; Thu, 12 Jan 2023 02:28:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=rIRFn+Xb; dkim=neutral (no key) header.i=@suse.cz header.b="H9MiK/DY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbjALKAm (ORCPT + 51 others); Thu, 12 Jan 2023 05:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbjALKAH (ORCPT ); Thu, 12 Jan 2023 05:00:07 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7A1718E0B for ; Thu, 12 Jan 2023 01:57:49 -0800 (PST) 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 127073EEDF; Thu, 12 Jan 2023 09:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1673517467; 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=yRCSQFW44Cc2tUnJiTmVd65jIs6fvgvwHYQz2Hxv9FI=; b=rIRFn+XbYsCB2mJEIE01vsJljj15gvqGKQY2YENMTlKvc4T6VoJxVfgk2rWh9+i/lEG+AH gPR0Sw+rmd3r+3uW25EscnTHq++r5W7CdAkkt7oLT14QbB+kbwzERO23IscSV1ApdhAvkL C6UvtL3NgKQjVg6gVCFjIRdERAK5GKA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1673517467; 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=yRCSQFW44Cc2tUnJiTmVd65jIs6fvgvwHYQz2Hxv9FI=; b=H9MiK/DYWPcH0X7jx3yLDcC91vr29O0UlIwz0egp25ulqsQbHys7RIL5enKiYKZtfc24p3 ioHhvQPXha3awfDg== 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 CB8EC13585; Thu, 12 Jan 2023 09:57:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8H/0MJrZv2ORHwAAMHmgww (envelope-from ); Thu, 12 Jan 2023 09:57:46 +0000 Message-ID: <48d8b7df-bc23-ba2b-135d-5d91046769fb@suse.cz> Date: Thu, 12 Jan 2023 10:57:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v3 1/5] mm: pagevec: add folio_batch_reinit() Content-Language: en-US To: Lorenzo Stoakes , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Hugh Dickins , Liam Howlett , William Kucharski , Christian Brauner , Jonathan Corbet , Mike Rapoport , Joel Fernandes , Geert Uytterhoeven References: From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/26/22 09:44, Lorenzo Stoakes wrote: > This performs the same task as pagevec_reinit(), only modifying a folio > batch rather than a pagevec. > > Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka > --- > include/linux/pagevec.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h > index 215eb6c3bdc9..2a6f61a0c10a 100644 > --- a/include/linux/pagevec.h > +++ b/include/linux/pagevec.h > @@ -103,6 +103,11 @@ static inline void folio_batch_init(struct folio_batch *fbatch) > fbatch->percpu_pvec_drained = false; > } > > +static inline void folio_batch_reinit(struct folio_batch *fbatch) > +{ > + fbatch->nr = 0; > +} > + > static inline unsigned int folio_batch_count(struct folio_batch *fbatch) > { > return fbatch->nr;