]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched/numa: implement access PID reset logic
authorRaghavendra K T <raghavendra.kt@amd.com>
Wed, 1 Mar 2023 12:19:02 +0000 (17:49 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:24:57 +0000 (16:24 -0700)
commit6cdcfb31c4e3d00b3288e9f20061a9a0705e12cf
tree9d121a427c3b222b7cb3f7109fa5fd93d7dfd358
parent22b3685d1e18e086a5486796e2f511b39ae702c0
sched/numa: implement access PID reset logic

This helps to ensure that only recently accessed PIDs scan the VMAs.

Current implementation: (idea supported by PeterZ)

 1. Accessing PID information is maintained in two windows.
    access_pids[1] being newest.

 2. Reset old access PID info i.e.  access_pid[0] every (4 *
    sysctl_numa_balancing_scan_delay) interval after initial scan delay
    period expires.

The above interval seemed to be experimentally optimum since it avoids
frequent reset of access info as well as helps clearing the old access
info regularly.  The reset logic is implemented in scan path.

Link: https://lkml.kernel.org/r/f7a675f66d1442d048b4216b2baf94515012c405.1677672277.git.raghavendra.kt@amd.com
Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>
Suggested-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Bharata B Rao <bharata@amd.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Disha Talreja <dishaa.talreja@amd.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
include/linux/mm_types.h
kernel/sched/fair.c