Re: [PATCH 6/6] sched/numa: Complete scanning of inactive VMAs when there is no alternative

From: Raghavendra K T
Date: Tue Oct 10 2023 - 07:40:25 EST


On 10/10/2023 2:53 PM, Ingo Molnar wrote:

* Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> wrote:

[...]
Both the number of PTE updates and hint faults is dramatically
increased. While this is superficially unfortunate, it represents
ranges that were simply skipped without the patch. As a result
of the scanning and hinting faults, many more pages were also
migrated but as the time to completion is reduced, the overhead
is offset by the gain.

Nice! I've applied your series to tip:sched/core with a few non-functional
edits to comment/changelog formatting/clarity.

Btw., was any previous analysis done on the size of the pids_active[] hash
and the hash collision rate?


Hello Ingo,

I did test to understand the behaviour threaded workloads relation to
pids_active[], and that there is more spread of bits set etc, but not
actually from hash_collision point of view since it would work better
for workloads that does not create multiple threads quickly (thus we
have sparse PIDs) as well as normal case where we have almost continuous
PIDS.

But I also did not try to increase size of individual pids_active more
than 64 for the same reasoning of Mel that at the most we endup doing
cross PTE updates.

Perhaps I can experiment when I come across workloads that have 512/1000s of threads to refine these cross PTE updates further.

However, I have tried increasing history (PeterZ's patch) (i.e., increasing array size of
pids_active[]) to get a better VMA candidate for PTE update in

https://lore.kernel.org/all/cover.1693287931.git.raghavendra.kt@xxxxxxx/T/

to handle what Mel suggested in other email.
viz.,

1. Task-active
2. Multiple tasks active
3. Any task active
4. Inactive

Thanks and Regards
- Raghu