lkml.org 
[lkml]   [2021]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] hugetlb: convert page_huge_active() to HP_Migratable flag
From
Date
On 1/16/21 4:06 AM, Oscar Salvador wrote:
> 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.

Thanks everyone!

I was unsure about the best way to go for this. Will send out a new version
in a few days using the page-flag style macros.

--
Mike Kravetz

\
 
 \ /
  Last update: 2021-01-16 22:56    [W:0.083 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site