From: Naoya Horiguchi <naoya.horiguchi@linux.dev>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
David Hildenbrand <david@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Vlastimil Babka <vbabka@suse.cz>,
Muchun Song <songmuchun@bytedance.com>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/5] include/uapi/linux/kernel-page-flags.h: define KPF_FOLIO
Date: Tue, 10 Oct 2023 23:27:57 +0900 [thread overview]
Message-ID: <20231010142801.3780917-2-naoya.horiguchi@linux.dev> (raw)
In-Reply-To: <20231010142801.3780917-1-naoya.horiguchi@linux.dev>
From: Naoya Horiguchi <naoya.horiguchi@nec.com>
Define a new KPF flag to represent folio in /proc/kpageflags and
in-kernel user page-types.c.
Note that in page-types.c I chose 'f' for the character representing folio,
which conflicts with KPF_SOFTDIRTY, but we have no other choice because
all reasonable choices ('f', 'F', 'o', 'O', 'l', 'L', 'i', and 'I') are
already used. You need to pay attention to long flag names or the position
of 'f' in short form.
Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
---
include/uapi/linux/kernel-page-flags.h | 1 +
tools/mm/page-types.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/uapi/linux/kernel-page-flags.h b/include/uapi/linux/kernel-page-flags.h
index 6f2f2720f3ac..9b43dadb7f49 100644
--- a/include/uapi/linux/kernel-page-flags.h
+++ b/include/uapi/linux/kernel-page-flags.h
@@ -36,5 +36,6 @@
#define KPF_ZERO_PAGE 24
#define KPF_IDLE 25
#define KPF_PGTABLE 26
+#define KPF_FOLIO 27
#endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */
diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c
index 8d5595b6c59f..b78448d19e88 100644
--- a/tools/mm/page-types.c
+++ b/tools/mm/page-types.c
@@ -126,6 +126,7 @@ static const char * const page_flag_names[] = {
[KPF_PGTABLE] = "g:pgtable",
[KPF_ZERO_PAGE] = "z:zero_page",
[KPF_IDLE] = "i:idle_page",
+ [KPF_FOLIO] = "f:folio",
[KPF_RESERVED] = "r:reserved",
[KPF_MLOCKED] = "m:mlocked",
--
2.25.1
next prev parent reply other threads:[~2023-10-10 14:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 14:27 [PATCH v1 0/5] mm, kpageflags: support folio and fix output for compound pages Naoya Horiguchi
2023-10-10 14:27 ` Naoya Horiguchi [this message]
2023-10-10 14:27 ` [PATCH v1 2/5] mm: kpageflags: distinguish thp and folio Naoya Horiguchi
2023-10-10 14:27 ` [PATCH v1 3/5] mm, kpageflags: separate code path for hugetlb pages Naoya Horiguchi
2023-10-10 14:28 ` [PATCH v1 4/5] mm, kpageflags: fix invalid output for PageSlab Naoya Horiguchi
2023-10-10 14:28 ` [PATCH v1 5/5] tools/mm/page-types.c: hide compound pages in non-raw mode Naoya Horiguchi
2023-10-12 8:33 ` [PATCH v1 0/5] mm, kpageflags: support folio and fix output for compound pages David Hildenbrand
2023-10-12 15:02 ` Naoya Horiguchi
2023-10-12 15:30 ` David Hildenbrand
2023-10-13 0:54 ` Naoya Horiguchi
2023-10-13 7:46 ` David Hildenbrand
2023-10-13 15:03 ` Matthew Wilcox
2023-10-16 10:13 ` David Hildenbrand
2023-10-16 11:36 ` Ryan Roberts
2023-10-18 5:25 ` Naoya Horiguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231010142801.3780917-2-naoya.horiguchi@linux.dev \
--to=naoya.horiguchi@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@nec.com \
--cc=songmuchun@bytedance.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox