From 33dffbbd331e2505178568843ae2ad09e3b306e4 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Thu, 22 Oct 2015 09:03:31 +1100 Subject: [PATCH] page-flags: add documentation for policies The patch adds description for page flags policies. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Christoph Lameter Signed-off-by: Andrew Morton --- include/linux/page-flags.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 8fa6acd1b349..625d24c2f3de 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -154,7 +154,23 @@ static inline int PageCompound(struct page *page) return test_bit(PG_head, &page->flags) || PageTail(page); } -/* Page flags policies wrt compound pages */ +/* + * Page flags policies wrt compound pages + * + * PF_ANY: + * the page flag is relevant for small, head and tail pages. + * + * PF_HEAD: + * for compound page all operations related to the page flag applied to + * head page. + * + * PF_NO_TAIL: + * modifications of the page flag must be done on small or head pages, + * checks can be done on tail pages too. + * + * PF_NO_COMPOUND: + * the page flag is not relevant for compound pages. + */ #define PF_ANY(page, enforce) page #define PF_HEAD(page, enforce) compound_head(page) #define PF_NO_TAIL(page, enforce) ({ \ -- 2.39.5