On 05/04/2018 08:33 PM, Matthew Wilcox wrote: > From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> > > We're already using a union of many fields here, so stop abusing the > _mapcount and make page_type its own field. That implies renaming some > of the machinery that creates PageBuddy, PageBalloon and PageKmemcg; > bring back the PG_buddy, PG_balloon and PG_kmemcg names. > > As suggested by Kirill, make page_type a bitmask. Because it starts out > life as -1 (thanks to sharing the storage with _mapcount), setting a > page flag means clearing the appropriate bit. This gives us space for > probably twenty or so extra bits (depending how paranoid we want to be > about _mapcount underflow). > > Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> > Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx>