Re: [RHEL-ALT-7.4 PATCH 2/2] sched,numa: scale scan period with tasks in group and shared/private

From: Mel Gorman
Date: Wed Aug 02 2017 - 06:23:03 EST


On Mon, Jul 31, 2017 at 03:28:47PM -0400, Rik van Riel wrote:
> From: Rik van Riel <riel@xxxxxxxxxx>
>
> Running 80 tasks in the same group, or as threads of the same process,
> results in the memory getting scanned 80x as fast as it would be if a
> single task was using the memory.
>
> This really hurts some workloads.
>

It would be nice to specify what workloads in particular and what sort
of machine because I'm willing to bet it has a bigger impact on machines
with 4+ nodes, particularly if they are not fully connected topologies.
Furthermore, I'm willing to bet that there would be small regressions on
2-socket machines but with less time spent scanning and processing
faults even if remote accesses are marginally increased.

Still, on balance, this is preferred behaviour.

> Scale the scan period by the number of tasks in the numa group, and
> the shared / private ratio, so the average rate at which memory in
> the group is scanned corresponds roughly to the rate at which a single
> task would scan its memory.
>
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

Acked-by: Mel Gorman <mgorman@xxxxxxx>

--
Mel Gorman
SUSE Labs