All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Lorenzo Stoakes <lstoakes@gmail.com>
Subject: [PATCH v3 1/5] mm: pagevec: add folio_batch_reinit()
Date: Mon, 26 Dec 2022 08:44:19 +0000	[thread overview]
Message-ID: <b75d577d0994229f142bcca8ff330c4c587389dd.1672043615.git.lstoakes@gmail.com> (raw)
In-Reply-To: <cover.1672043615.git.lstoakes@gmail.com>

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;
-- 
2.39.0


  reply	other threads:[~2022-12-26  8:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26  8:44 [PATCH v3 0/5] update mlock to use folios Lorenzo Stoakes
2022-12-26  8:44 ` Lorenzo Stoakes [this message]
2023-01-12  9:57   ` [PATCH v3 1/5] mm: pagevec: add folio_batch_reinit() Vlastimil Babka
2022-12-26  8:44 ` [PATCH v3 2/5] mm: mlock: use folios and a folio batch internally Lorenzo Stoakes
2023-01-12 10:31   ` Vlastimil Babka
2023-01-12 11:27     ` Lorenzo Stoakes
2022-12-26  8:44 ` [PATCH v3 3/5] m68k/mm/motorola: specify pmd_page() type Lorenzo Stoakes
2022-12-27  9:38   ` Geert Uytterhoeven
2023-01-12 10:38   ` Vlastimil Babka
2022-12-26  8:44 ` [PATCH v3 4/5] mm: mlock: update the interface to use folios Lorenzo Stoakes
2023-01-12 10:55   ` Vlastimil Babka
2023-01-12 12:01     ` Lorenzo Stoakes
2022-12-26  8:44 ` [PATCH v3 5/5] Documentation/mm: Update references to __m[un]lock_page() to *_folio() Lorenzo Stoakes
2023-01-12 11:04   ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b75d577d0994229f142bcca8ff330c4c587389dd.1672043615.git.lstoakes@gmail.com \
    --to=lstoakes@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=corbet@lwn.net \
    --cc=geert@linux-m68k.org \
    --cc=hughd@google.com \
    --cc=joel@joelfernandes.org \
    --cc=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=william.kucharski@oracle.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.