Thread (96 messages) 96 messages, 6 authors, 2021-06-08

Re: [PATCH v10 28/33] mm/filemap: Add folio_wait_bit

From: Vlastimil Babka <hidden>
Date: 2021-05-18 11:52:01
Also in: linux-fsdevel, lkml

On 5/11/21 11:47 PM, Matthew Wilcox (Oracle) wrote:
Rename wait_on_page_bit() to folio_wait_bit().  We must always wait on
the folio, otherwise we won't be woken up due to the tail page hashing
to a different bucket from the head page.

This commit shrinks the kernel by 691 bytes, mostly due to moving
the page waitqueue lookup into folio_wait_bit_common().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jeff Layton <jlayton@kernel.org>

Acked-by: Vlastimil Babka <redacted>


Nit below.
quoted hunk ↗ jump to hunk
---
 include/linux/pagemap.h | 10 +++---
 mm/filemap.c            | 77 +++++++++++++++++++----------------------
 mm/page-writeback.c     |  4 +--
 3 files changed, 43 insertions(+), 48 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 06b69cd03da3..e524e1b7190a 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -714,11 +714,11 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
 }
 
 /*
- * This is exported only for wait_on_page_locked/wait_on_page_writeback, etc.,
+ * This is exported only for folio_wait_locked/folio_wait_writeback, etc.,
  * and should not be used directly.
  */
-extern void wait_on_page_bit(struct page *page, int bit_nr);
-extern int wait_on_page_bit_killable(struct page *page, int bit_nr);
+extern void folio_wait_bit(struct folio *folio, int bit_nr);
+extern int folio_wait_bit_killable(struct folio *folio, int bit_nr);
Nit: you remove these 'externs' in other patches, not here?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help