Re: [PATCH 1/2] mm, page_alloc: don't convert pfn to idx when merging

From: Mel Gorman
Date: Fri Dec 09 2016 - 14:40:35 EST

On Fri, Dec 09, 2016 at 07:32:22PM +0100, Vlastimil Babka wrote:
> > As a slight aside, I recently spotted that one of the largest overhead
> > in the bulk free path was in the page_is_buddy() checks so pretty much
> > anything that helps that is welcome.
> Interesting, the function shouldn't be doing really much on x86 without
> debug config options? We might try further optimize the zone equivalence
> checks, perhaps?

I don't have the data any more but IIRC, it was cache miss intensive and
I assumed at the time that it was checking cache cold struct pages
during merges.

At the time I was looking at splitting the per-cpu lists into irq and
non-irq so wasn't focused on the page_is_buddy part of the profile. It
just stuck in my mind as being surprisingly high.

Mel Gorman