On Wed, Nov 11, 2020 at 03:40:05PM -0500, Zi Yan wrote: > - for (i = 0; i < nr; i++) { > + for (i = 0; i < nr; i += (1 << new_order)) { > page_owner = get_page_owner(page_ext); > - page_owner->order = 0; > + page_owner->order = new_order; > page_ext = page_ext_next(page_ext); > } This doesn't do what you're hoping it will. It's going to set ->order to new_order for the first N pages instead of every 1/N pages. You'll need to do something like page_ext = lookup_page_ext(page + i); or add a new page_ext_add(page_ext, 1 << new_order);