lkml.org 
[lkml]   [2021]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 28/33] mm/filemap: Add folio_wait_bit
From
Date
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 <vbabka@suse.cz>


Nit below.

> ---
> 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?

\
 
 \ /
  Last update: 2021-05-18 13:53    [W:0.528 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site