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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC81DC54EBC for ; Thu, 12 Jan 2023 10:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232431AbjALKAo (ORCPT ); Thu, 12 Jan 2023 05:00:44 -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 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;