Message ID | f05b330bc806aa64f6ae5d0001ea9d29d47da354.1671738120.git.lstoakes@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp133734wrn; Thu, 22 Dec 2022 11:49:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvC/fXaRB3q+8SZAKA2bIP+aoeeEfsXWmydr2N52sm4V0PLK6KfkNqxA7XXQ7cVVbS94LHB X-Received: by 2002:a17:90b:3597:b0:219:b1f0:ddf0 with SMTP id mm23-20020a17090b359700b00219b1f0ddf0mr7619302pjb.36.1671738574537; Thu, 22 Dec 2022 11:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671738574; cv=none; d=google.com; s=arc-20160816; b=d+fJj5vhGyBEYmL0Gaq/hOqFqU0zi87iLaOrfcA/LWqchxnEdy93T/vVEYOw7TvbDq m1t7Ew7KYxcgoUN7os+1PKdas/zizDgnK9Atsu0kpYKrUL4eucFaomLOzdKji4yAq4TQ 4iERoZTCwX1fXwcYxWpOe8W6cThuuAyG6t37qsf1wn+3+/HOZ4rRadnffDvnZJfnrgx3 KI/xvlLZqWhnxLWtNDWFF9PDskTY62noRUU2rAWOl19SO5QpfbbD8jvb7Jjoh+FPxyQY oJesiTdBmwUvYX8NlBCk6WJma2zov4mksWKuPFCRtlox3/ucqoYRFHxwmR+JEtOQGhM+ QULQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WF0czWG0z2T4oq6TY2ZkLRE6dWmClGYr0kuRjGhgjlc=; b=xWd4UmTYlQ93FUOPerF8encnRNMera0+/DE8HyfFAu3UBr9zfZYbwVdOPoyPwJTBPs 2Rap0lqWSy06XFOoitmiXyOFv6aVuGuToOCzNwc9BBS3saf2LGyUS7Y/cOPBxVkAtZga fr4LBg2Lc3TWpnyuoLDrvwisUGfiw6Ih1oRZotmYMqywcj7tWbLDAFAXMPiEtRKKpsMv JZi7d7LssdMh2FGs87m3RVUXCF0V4B+P6K0BPLGQmk3wQRjcOC5sQMJCbgivxRNkAY9k 9rfu8igJzEwZ5qKai50ZEANv31ZYjiih2Ywu6LgqxH2w+8T0ktQ7GB7wPixo+HD8TsnL o2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MwlMQDoj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l62-20020a638841000000b00478d5b7e86bsi1586373pgd.539.2022.12.22.11.49.21; Thu, 22 Dec 2022 11:49:34 -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=@gmail.com header.s=20210112 header.b=MwlMQDoj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbiLVTsx (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 22 Dec 2022 14:48:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbiLVTss (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 22 Dec 2022 14:48:48 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68EB21838B for <linux-kernel@vger.kernel.org>; Thu, 22 Dec 2022 11:48:42 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id y8so2661751wrl.13 for <linux-kernel@vger.kernel.org>; Thu, 22 Dec 2022 11:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WF0czWG0z2T4oq6TY2ZkLRE6dWmClGYr0kuRjGhgjlc=; b=MwlMQDojPRl1N9RKswNye3CDEdP22NLQDZUxmKlxgtsd8sFEE9avKa8OUrmMpIrDOo Aon+VZIurNEFXw6IJhGWiW+VFEAsegrOwl4WFS1jMQhSQ5fZh3XoJaiY3BPkj5/zlcm9 aN38lXwyHCc7/V4rdO312r8Rzu8HSP5ddz77APwlAgLiQYiClEaE34pMSo61W49YSVT7 BwALNp1tPo0ADZziuee4Kvo+X8H5L0NfrheCjhDjPGWO+Th4gUZ2AKvDQ+t9agou4j6U FYgZ5sqQNPaMOSkhV9S2NrQpntsNyJKqeeJDicruSV1dKsr1Q2tLYk/lap/UrDzmUn+O lQFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WF0czWG0z2T4oq6TY2ZkLRE6dWmClGYr0kuRjGhgjlc=; b=Pd8AYuyAM5Xn9AG5MhpMHumJm3eW2SwRdZXEusQt17OuoLLXwSgyrdNLgMVDXF2TnW rKr2Zwg0C55gO4X5/6uRgR4YgKGn0xjr9+dRyqjNSlUrpCmfCV40audGXvVVJrznhuJn Z0bIgKIjYA8Phcnqb8C2JJ7XFlDnalcYQJFWX5DPqRbNvgyg4Hmx0O7nTw7m/vNSNHk/ CB+ZR46X6R4d8D+of20jHvv6kVr/Dfix+JU3f6bOaDNuG22PUJkWRB6U//klmlAxxK8N eHgsLBke3bnhzFA2+1B77N4cgBP7PZY55byWnD8BTLFf7GD2B3IqT1d+CFFJb/QayhNq RWGw== X-Gm-Message-State: AFqh2kqRPqvLnn6aCugIuQo65b2lFPoa4dyYP+RZcZ5dKR2ppJnFiMdM 6/EjlYIVwx9ecc5b45AOfVc= X-Received: by 2002:a05:6000:128a:b0:236:7591:cf13 with SMTP id f10-20020a056000128a00b002367591cf13mr4904284wrx.40.1671738520872; Thu, 22 Dec 2022 11:48:40 -0800 (PST) Received: from lucifer.home ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.googlemail.com with ESMTPSA id i1-20020adfb641000000b002425787c5easm1349317wre.96.2022.12.22.11.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 11:48:40 -0800 (PST) From: Lorenzo Stoakes <lstoakes@gmail.com> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org Cc: Matthew Wilcox <willy@infradead.org>, Hugh Dickins <hughd@google.com>, Vlastimil Babka <vbabka@suse.cz>, Liam Howlett <liam.howlett@oracle.com>, William Kucharski <william.kucharski@oracle.com>, Christian Brauner <brauner@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Mike Rapoport <rppt@kernel.org>, Joel Fernandes <joel@joelfernandes.org>, Lorenzo Stoakes <lstoakes@gmail.com> Subject: [PATCH 1/4] mm: pagevec: add folio_batch_reinit() Date: Thu, 22 Dec 2022 19:48:30 +0000 Message-Id: <f05b330bc806aa64f6ae5d0001ea9d29d47da354.1671738120.git.lstoakes@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <cover.1671738120.git.lstoakes@gmail.com> References: <cover.1671738120.git.lstoakes@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752944947641974316?= X-GMAIL-MSGID: =?utf-8?q?1752944947641974316?= |
Series | update mlock to use folios | |
Commit Message
Lorenzo Stoakes
Dec. 22, 2022, 7:48 p.m. UTC
This performs the same task as pagevec_reinit(), only modifying a folio
batch rather than a pagevec.
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
---
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;