Re: [PATCH v2] mm/page_alloc: Allow high-order pages to be stored on the per-cpu lists

From: Mel Gorman
Date: Sat Jun 12 2021 - 06:12:21 EST


On Fri, Jun 11, 2021 at 04:23:31PM -0700, Andrew Morton wrote:
> > +static inline int pindex_to_order(unsigned int pindex)
> > +{
> > + int order = pindex / MIGRATE_PCPTYPES;
> > +
> > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> > + if (order > PAGE_ALLOC_COSTLY_ORDER) {
> > + order = pageblock_order;
> > + VM_BUG_ON(order != pageblock_order);
>
> Somebody has trust issues?
>

Just a little bit :P

> > + }
> > +#else
> > + VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER);
> > +#endif
> > +
> > + return order;
> > +}
>
> Do we really need all these assertions, long-term?
>

No, definitely not. Even now it's but already the patch caught me by
surprise (breaking kvm boot) so I'd like to leave them in for at least
one release given the number of changes queued in your tree for the next
merge window.

Thanks.

--
Mel Gorman
SUSE Labs