summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2013-10-07 06:29:36 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 08:48:16 -0400
commit04bb2f9475054298f0c67a89ca92cade42d3fe5e (patch)
treeab48887e23b7f820380a3f415cbe0a6f64f7fecc /include/linux/sched.h
parent3e6a9418cf05638b103e34f5d13be0321872e623 (diff)
sched/numa: Adjust scan rate in task_numa_placement
Adjust numa_scan_period in task_numa_placement, depending on how much useful work the numa code can do. The more local faults there are in a given scan window the longer the period (and hence the slower the scan rate) during the next window. If there are excessive shared faults then the scan period will decrease with the amount of scaling depending on whether the ratio of shared/private faults. If the preferred node changes then the scan rate is reset to recheck if the task is properly placed. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Mel Gorman <mgorman@suse.de> 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-59-git-send-email-mgorman@suse.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 59f953b2e413..2292f6c1596f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1365,6 +1365,14 @@ struct task_struct {
1365 */ 1365 */
1366 unsigned long *numa_faults_buffer; 1366 unsigned long *numa_faults_buffer;
1367 1367
1368 /*
1369 * numa_faults_locality tracks if faults recorded during the last
1370 * scan window were remote/local. The task scan period is adapted
1371 * based on the locality of the faults with different weights
1372 * depending on whether they were shared or private faults
1373 */
1374 unsigned long numa_faults_locality[2];
1375
1368 int numa_preferred_nid; 1376 int numa_preferred_nid;
1369 unsigned long numa_pages_migrated; 1377 unsigned long numa_pages_migrated;
1370#endif /* CONFIG_NUMA_BALANCING */ 1378#endif /* CONFIG_NUMA_BALANCING */
@@ -1455,6 +1463,7 @@ struct task_struct {
1455#define TNF_MIGRATED 0x01 1463#define TNF_MIGRATED 0x01
1456#define TNF_NO_GROUP 0x02 1464#define TNF_NO_GROUP 0x02
1457#define TNF_SHARED 0x04 1465#define TNF_SHARED 0x04
1466#define TNF_FAULT_LOCAL 0x08
1458 1467
1459#ifdef CONFIG_NUMA_BALANCING 1468#ifdef CONFIG_NUMA_BALANCING
1460extern void task_numa_fault(int last_node, int node, int pages, int flags); 1469extern void task_numa_fault(int last_node, int node, int pages, int flags);