Re: [PATCH v11 18/33] mm/filemap: Add folio_unlock()

From: David Howells
Date: Wed Jun 16 2021 - 06:13:40 EST


Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> wrote:

> Convert unlock_page() to call folio_unlock(). By using a folio we
> avoid a call to compound_head(). This shortens the function from 39
> bytes to 25 and removes 4 instructions on x86-64. Because we still
> have unlock_page(), it's a net increase of 16 bytes of text for the
> kernel as a whole, but any path that uses folio_unlock() will execute
> 4 fewer instructions.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Acked-by: Jeff Layton <jlayton@xxxxxxxxxx>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Reviewed-by: William Kucharski <william.kucharski@xxxxxxxxxx>

Reviewed-by: David Howells <dhowells@xxxxxxxxxx>