From: Oscar Salvador <osalvador@suse.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Michal Hocko <mhocko@kernel.org>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Muchun Song <songmuchun@bytedance.com>,
David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/5] hugetlb: convert page_huge_active() to HP_Migratable flag
Date: Sat, 16 Jan 2021 13:06:28 +0100 [thread overview]
Message-ID: <20210116120628.GA3024@localhost.localdomain> (raw)
In-Reply-To: <20210116042416.GA2260413@casper.infradead.org>
On Sat, Jan 16, 2021 at 04:24:16AM +0000, Matthew Wilcox wrote:
> and name these HPG_restore_reserve and HPG_migratable
>
> and generate the calls to hugetlb_set_page_flag etc from macros, eg:
>
> #define TESTHPAGEFLAG(uname, lname) \
> static __always_inline bool HPage##uname(struct page *page) \
> { return test_bit(HPG_##lname, &page->private); }
> ...
> #define HPAGEFLAG(uname, lname) \
> TESTHPAGEFLAG(uname, lname) \
> SETHPAGEFLAG(uname, lname) \
> CLEARHPAGEFLAG(uname, lname)
>
> HPAGEFLAG(RestoreReserve, restore_reserve)
> HPAGEFLAG(Migratable, migratable)
>
> just to mirror page-flags.h more closely.
That is on me.
I thought that given the low number of flags, we coud get away with:
hugetlb_{set,test,clear}_page_flag(page, flag)
and call it from the code.
But some of the flags need to be set/tested outside hugetlb code, so
it indeed looks nicer and more consistent to follow page-flags.h convention.
Sorry for the noise.
--
Oscar Salvador
SUSE L3
next prev parent reply other threads:[~2021-01-16 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 0:31 [PATCH 0/5] create hugetlb flags to consolidate state Mike Kravetz
2021-01-16 0:31 ` [PATCH 1/5] hugetlb: use page.private for hugetlb specific page flags Mike Kravetz
2021-01-16 0:31 ` [PATCH 2/5] hugetlb: convert page_huge_active() to HP_Migratable flag Mike Kravetz
2021-01-16 4:24 ` Matthew Wilcox
2021-01-16 4:36 ` [External] " Muchun Song
2021-01-16 12:06 ` Oscar Salvador [this message]
2021-01-16 21:53 ` Mike Kravetz
2021-01-16 0:31 ` [PATCH 3/5] hugetlb: only set HP_Migratable for migratable hstates Mike Kravetz
2021-01-16 0:31 ` [PATCH 4/5] hugetlb: convert PageHugeTemporary() to HP_Temporary flag Mike Kravetz
2021-01-16 0:31 ` [PATCH 5/5] hugetlb: convert PageHugeFreed to HP_Freed flag Mike Kravetz
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=20210116120628.GA3024@localhost.localdomain \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=songmuchun@bytedance.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.