Re: [PATCH] Don't touch single threaded PTEs which are on the right node
From: Andi Kleen
Date: Wed Oct 12 2016 - 11:40:45 EST
> You shouldn't need to check the number of mm_users and the node the task
> is running on for every PTE being scanned.
Ok.
>
> A more important corner case is if the VMA is shared with a task running on
> another node. By avoiding the NUMA hinting faults here, the hinting faults
> trapped by the remote process will appear exclusive and allow migration of
> the page. This will happen even if the single-threade task is continually
> using the pages.
>
> When you said "we had some problems", you didn't describe the workload or
> what the problems were (I'm assuming latency/jitter). Would restricting
> this check to private VMAs be sufficient?
The problem we ran into was that prefetches were not working, but
yes it would also cause extra latencies and jitter and in general
is unnecessary overhead.
It is super easy to reproduce. Just run main() {for(;;);}
It will eventually get some of its pages unmapped.
Yes doing it for private only would be fine. I'll add a check
for that.
-Andi