Re: [PATCH v4 2/3] mm/free_pcppages_bulk: do not hold lock when picking pages to free

From: Dave Hansen
Date: Fri Mar 02 2018 - 10:34:15 EST


On 03/01/2018 11:15 PM, Aaron Lu wrote:
>
>> I am still quite surprised that this would have such a large impact.
> Most likely due to the cachelines for these page structures are warmed
> up outside of zone->lock.

The workload here is a pretty tight microbenchmark and single biggest
bottleneck is cache misses on 'struct page'. It's not memory bandwidth
bound. So, anything you can give the CPU keep it fed and not waiting on
cache misses will be a win.

There's never going to be a real-world workload that sees this kind of
increase, but the change in the micro isn't super-surprising because it
so directly targets the bottleneck.