On Thu, Oct 31, 2024 at 8:35 PM Charan Teja Kalla <quic_charante@xxxxxxxxxxx> wrote: > > Hi Yu, > > On 3/1/2024 12:04 AM, Yu Zhao wrote: > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > index de292a007138..c0f9d21b4d18 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h > > @@ -88,8 +88,8 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) > > * GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms. > > */ > > > > -#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4 > > -/* ZONE_DEVICE is not a valid GFP zone specifier */ > > +#if MAX_NR_ZONES - 2 - IS_ENABLED(CONFIG_ZONE_DEVICE) <= 4 > > +/* zones beyond ZONE_MOVABLE are not valid GFP zone specifiers */ > > #define GFP_ZONES_SHIFT 2 > > #else > > #define GFP_ZONES_SHIFT ZONES_SHIFT > > @@ -135,9 +135,29 @@ static inline enum zone_type gfp_zone(gfp_t flags) > > z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) & > > ((1 << GFP_ZONES_SHIFT) - 1); > > VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1); > > + > > + if ((flags & (__GFP_MOVABLE | __GFP_COMP)) == (__GFP_MOVABLE | __GFP_COMP)) > > + return LAST_VIRT_ZONE; > > + > Not sure If someone had already reported this: With this patch, we allow > pages to allocate from movable zone(through fallback from > LAST_VIRT_ZONE) even with out __GFP_HIGHMEM. The commit cc09cb134124a > ("mm/page_alloc: Add folio allocation functions") sets the __GFP_COMP by > default and user has just to pass the __GFP_MOVABLE. Please CMIW. Hi Charan, I don't remember whether we have this fixed in the Android kernel off the top of head -- I'll ask Kalesh to take a closer look and follow up with you. Thanks!