lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 01/33] mm: Introduce struct folio
From
Date
On 5/11/21 11:47 PM, Matthew Wilcox (Oracle) wrote:
> +/**
> + * folio_page - Return a page from a folio.
> + * @folio: The folio.
> + * @n: The page number to return.
> + *
> + * @n is relative to the start of the folio. It should be between
> + * 0 and folio_nr_pages(@folio) - 1, but this is not checked for.
> + */
> +#define folio_page(folio, n) nth_page(&(folio)->page, n)

BTW, would it make sense to have also a folio_page(folio) wrapper? Or is
"&folio->page" used in later patches sufficiently elegant and stable enough for
the future?

> static __always_inline int PageTail(struct page *page)
> {
> return READ_ONCE(page->compound_head) & 1;
>

\
 
 \ /
  Last update: 2021-05-14 12:40    [W:0.486 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site