Re: [PATCH] mm: save two stranding bit in gfp_mask

From: Vlastimil Babka
Date: Wed May 16 2018 - 16:09:11 EST


On 05/16/2018 10:20 PM, Shakeel Butt wrote:
> ___GFP_COLD and ___GFP_OTHER_NODE were removed but their bits were
> stranded. Slide existing gfp masks to make those two bits available.

Well, there are already available for hypothetical new flags. Is there
anything that benefits from a smaller __GFP_BITS_SHIFT? Otherwise no big
objection, besides the churn. Maybe move the last (well, before
NOLOCKDEP) two flags to the "holes" instead of shifting everything? That
would be closer to what compaction does...
There's also an ongoing effort to make the lowest 4 flags a number,
would that mean more free bits and churn soon?
I would also dislike having to learn new numbers for typical flag
combinations to recognize them in oom reports/alloc failures, but
somebody had the great idea to print those symbolically, so nevermind.

Vlastimil

> Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx>