On Mon, Sep 14, 2026 at 04:10:49PM +0200, David Hildenbrand (Arm) wrote:
> 
> >  
> > -   if (hpage_size == pmd_pagesize)
> > -           return __check_pmd_huge(addr, "AnonHugePages: ", nr_hpages, 
> > hpage_size);
> > +static bool check_huge_type(uint64_t categories, uint64_t kpageflags,
> > +                       enum check_huge_type type)
> > +{
> > +   const bool file = categories & PAGE_IS_FILE;
> > +   const bool swapbacked = kpageflags & KPF_SWAPBACKED;
> > +
> > +   switch (type) {
> > +   case CHECK_HUGE_ANON:
> > +           return !file;
> > +   case CHECK_HUGE_FILE:
> > +           return file && !swapbacked;
> > +   case CHECK_HUGE_SHMEM:
> > +           return file && swapbacked;
> > +   }
> 
> I wasn't probably clear. Don't add an intermediate CHECK_HUGE_SHMEM. Make
> check_huge_shmem() simply use CHECK_HUGE_FILE and remove the function then in
> patch #3.

Okay. Thanks for clarification ;)

-- 
Sincerely,
Yeoreum Yun

Reply via email to