Re: [RESEND PATCH 0/3] mm: Add cache coloring mechanism

From: Vlastimil Babka
Date: Fri Aug 25 2017 - 05:05:32 EST


On 08/24/2017 06:08 PM, Dave Hansen wrote:
> On 08/24/2017 05:47 AM, Vlastimil Babka wrote:
>> So the obvious question, what about THPs? Their size should be enough to
>> contain all the colors with current caches, no? Even on KNL I didn't
>> find more than "32x 1 MB 16-way L2 caches". This is in addition to the
>> improved TLB performance, which you want to get as well for such workloads?
>
> The cache in this case is "MCDRAM" which is 16GB in size. It can be
> used as normal RAM or a cache. This patch deals with when "MCDRAM" is
> in its cache mode.

Hm, 16GB direct mapped, that means 8k colors for 2MB THP's. Is that
really practical? Wouldn't such workload use 1GB hugetlbfs pages? Then
it's still 16 colors to manage, but could be done purely in userspace
since they should not move in physical memory and userspace can control
where to map each phase in the virtual layout.

> It's described in the "Memory Modes" slide here:
>
>> http://www.nersc.gov/users/computational-systems/cori/configuration/knl-processor-modes/
>