From fs/proc/task_mmu.c (Linux kernel v6.9.6)
2557 static void gather_stats(struct page *page, struct numa_maps *md, int pte_dirty,2557 unsigned long nr_pages)
2558 {
2559 int count = page_mapcount(page);
2560
2561 md->pages += nr_pages;
2562 if (pte_dirty || PageDirty(page))
2563 md->dirty += nr_pages;
2564
2565 if (PageSwapCache(page))
2566 md->swapcache += nr_pages;
2567
2568 if (PageActive(page) || PageUnevictable(page))
2569 md->active += nr_pages;
2570
2571 if (PageWriteback(page))
2572 md->writeback += nr_pages;
2573
2574 if (PageAnon(page))
2575 md->anon += nr_pages;
2576
2577 if (count > md->mapcount_max)
2578 md->mapcount_max = count;
2579
2580 md->node[page_to_nid(page)] += nr_pages;
2581 }
All these Page{Active,Writeback,...}(page)
when I jump to in VS Code:
PAGEFLAG(Active, active, PF_HEAD) __CLEARPAGEFLAG(Active, active, PF_HEAD)
TESTCLEARFLAG(Active, active, PF_HEAD)
And if I grep -R PageActive
it is defined nowhere.
How does this work? Is this a GCC specific thing?
4