diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 37e895a941a..dd18087fd36 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -812,6 +812,15 @@ void task_numa_fault(int node, int pages) | |||
| 812 | 812 | ||
| 813 | /* FIXME: Allocate task-specific structure for placement policy here */ | 813 | /* FIXME: Allocate task-specific structure for placement policy here */ |
| 814 | 814 | ||
| 815 | /* | ||
| 816 | * Assume that as faults occur that pages are getting properly placed | ||
| 817 | * and fewer NUMA hints are required. Note that this is a big | ||
| 818 | * assumption, it assumes processes reach a steady steady with no | ||
| 819 | * further phase changes. | ||
| 820 | */ | ||
| 821 | p->numa_scan_period = min(sysctl_numa_balancing_scan_period_max, | ||
| 822 | p->numa_scan_period + jiffies_to_msecs(2)); | ||
| 823 | |||
| 815 | task_numa_placement(p); | 824 | task_numa_placement(p); |
| 816 | } | 825 | } |
| 817 | 826 | ||
| @@ -858,7 +867,7 @@ void task_numa_work(struct callback_head *work) | |||
| 858 | if (p->numa_scan_period == 0) | 867 | if (p->numa_scan_period == 0) |
| 859 | p->numa_scan_period = sysctl_numa_balancing_scan_period_min; | 868 | p->numa_scan_period = sysctl_numa_balancing_scan_period_min; |
| 860 | 869 | ||
| 861 | next_scan = now + 2*msecs_to_jiffies(p->numa_scan_period); | 870 | next_scan = now + msecs_to_jiffies(p->numa_scan_period); |
| 862 | if (cmpxchg(&mm->numa_next_scan, migrate, next_scan) != migrate) | 871 | if (cmpxchg(&mm->numa_next_scan, migrate, next_scan) != migrate) |
| 863 | return; | 872 | return; |
| 864 | 873 | ||
