Skip to content

Commit 930aa17

Browse files
Mel Gormaningomolnar
authored andcommitted
sched/numa: Remove the numa_balancing_scan_period_reset sysctl
With scan rate adaptions based on whether the workload has properly converged or not there should be no need for the scan period reset hammer. Get rid of it. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1381141781-10992-60-git-send-email-mgorman@suse.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 04bb2f9 commit 930aa17

6 files changed

Lines changed: 4 additions & 37 deletions

File tree

‎Documentation/sysctl/kernel.txt‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,13 @@ guarantee. If the target workload is already bound to NUMA nodes then this
374374
feature should be disabled. Otherwise, if the system overhead from the
375375
feature is too high then the rate the kernel samples for NUMA hinting
376376
faults may be controlled by the numa_balancing_scan_period_min_ms,
377-
numa_balancing_scan_delay_ms, numa_balancing_scan_period_reset,
378-
numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb and
379-
numa_balancing_settle_count sysctls.
377+
numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
378+
numa_balancing_scan_size_mb and numa_balancing_settle_count sysctls.
380379

381380
==============================================================
382381

383382
numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms,
384-
numa_balancing_scan_period_max_ms, numa_balancing_scan_period_reset,
385-
numa_balancing_scan_size_mb
383+
numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
386384

387385
Automatic NUMA balancing scans tasks address space and unmaps pages to
388386
detect if pages are properly placed or if the data should be migrated to a
@@ -418,9 +416,6 @@ rate for each task.
418416
numa_balancing_scan_size_mb is how many megabytes worth of pages are
419417
scanned for a given scan.
420418

421-
numa_balancing_scan_period_reset is a blunt instrument that controls how
422-
often a tasks scan delay is reset to detect sudden changes in task behaviour.
423-
424419
numa_balancing_settle_count is how many scan periods must complete before
425420
the schedule balancer stops pushing the task towards a preferred node. This
426421
gives the scheduler a chance to place the task on an alternative node if the

‎include/linux/mm_types.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,6 @@ struct mm_struct {
420420
*/
421421
unsigned long numa_next_scan;
422422

423-
/* numa_next_reset is when the PTE scanner period will be reset */
424-
unsigned long numa_next_reset;
425-
426423
/* Restart point for scanning and setting pte_numa */
427424
unsigned long numa_scan_offset;
428425

‎include/linux/sched/sysctl.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ extern enum sched_tunable_scaling sysctl_sched_tunable_scaling;
4747
extern unsigned int sysctl_numa_balancing_scan_delay;
4848
extern unsigned int sysctl_numa_balancing_scan_period_min;
4949
extern unsigned int sysctl_numa_balancing_scan_period_max;
50-
extern unsigned int sysctl_numa_balancing_scan_period_reset;
5150
extern unsigned int sysctl_numa_balancing_scan_size;
5251
extern unsigned int sysctl_numa_balancing_settle_count;
5352

‎kernel/sched/core.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,6 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
17211721
#ifdef CONFIG_NUMA_BALANCING
17221722
if (p->mm && atomic_read(&p->mm->mm_users) == 1) {
17231723
p->mm->numa_next_scan = jiffies + msecs_to_jiffies(sysctl_numa_balancing_scan_delay);
1724-
p->mm->numa_next_reset = jiffies + msecs_to_jiffies(sysctl_numa_balancing_scan_period_reset);
17251724
p->mm->numa_scan_seq = 0;
17261725
}
17271726

‎kernel/sched/fair.c‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,6 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
826826
*/
827827
unsigned int sysctl_numa_balancing_scan_period_min = 1000;
828828
unsigned int sysctl_numa_balancing_scan_period_max = 60000;
829-
unsigned int sysctl_numa_balancing_scan_period_reset = 60000;
830829

831830
/* Portion of address space to scan in MB */
832831
unsigned int sysctl_numa_balancing_scan_size = 256;
@@ -1685,24 +1684,9 @@ void task_numa_work(struct callback_head *work)
16851684
if (p->flags & PF_EXITING)
16861685
return;
16871686

1688-
if (!mm->numa_next_reset || !mm->numa_next_scan) {
1687+
if (!mm->numa_next_scan) {
16891688
mm->numa_next_scan = now +
16901689
msecs_to_jiffies(sysctl_numa_balancing_scan_delay);
1691-
mm->numa_next_reset = now +
1692-
msecs_to_jiffies(sysctl_numa_balancing_scan_period_reset);
1693-
}
1694-
1695-
/*
1696-
* Reset the scan period if enough time has gone by. Objective is that
1697-
* scanning will be reduced if pages are properly placed. As tasks
1698-
* can enter different phases this needs to be re-examined. Lacking
1699-
* proper tracking of reference behaviour, this blunt hammer is used.
1700-
*/
1701-
migrate = mm->numa_next_reset;
1702-
if (time_after(now, migrate)) {
1703-
p->numa_scan_period = task_scan_min(p);
1704-
next_scan = now + msecs_to_jiffies(sysctl_numa_balancing_scan_period_reset);
1705-
xchg(&mm->numa_next_reset, next_scan);
17061690
}
17071691

17081692
/*

‎kernel/sysctl.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,6 @@ static struct ctl_table kern_table[] = {
370370
.mode = 0644,
371371
.proc_handler = proc_dointvec,
372372
},
373-
{
374-
.procname = "numa_balancing_scan_period_reset",
375-
.data = &sysctl_numa_balancing_scan_period_reset,
376-
.maxlen = sizeof(unsigned int),
377-
.mode = 0644,
378-
.proc_handler = proc_dointvec,
379-
},
380373
{
381374
.procname = "numa_balancing_scan_period_max_ms",
382375
.data = &sysctl_numa_balancing_scan_period_max,

0 commit comments

Comments
 (0)