diff options
author | Rik van Riel <riel@redhat.com> | 2014-01-27 17:03:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-28 07:17:05 -0500 |
commit | 50ec8a401fed6d246ab65e6011d61ac91c34af70 (patch) | |
tree | a78aa3c23bb9837be712d72a39c19b3d7246170d /include/linux/sched.h | |
parent | ff1df896aef8e0ec1556a5c44f424bd45bfa2cbe (diff) |
sched/numa: Track from which nodes NUMA faults are triggered
Track which nodes NUMA faults are triggered from, in other words
the CPUs on which the NUMA faults happened. This uses a similar
mechanism to what is used to track the memory involved in numa faults.
The next patches use this to build up a bitmap of which nodes a
workload is actively running on.
Signed-off-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Chegu Vinod <chegu_vinod@hp.com>
Link: http://lkml.kernel.org/r/1390860228-21539-4-git-send-email-riel@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 144d509df053..5fb0cfb43ecf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1480,6 +1480,13 @@ struct task_struct { | |||
1480 | unsigned long *numa_faults_buffer_memory; | 1480 | unsigned long *numa_faults_buffer_memory; |
1481 | 1481 | ||
1482 | /* | 1482 | /* |
1483 | * Track the nodes the process was running on when a NUMA hinting | ||
1484 | * fault was incurred. | ||
1485 | */ | ||
1486 | unsigned long *numa_faults_cpu; | ||
1487 | unsigned long *numa_faults_buffer_cpu; | ||
1488 | |||
1489 | /* | ||
1483 | * numa_faults_locality tracks if faults recorded during the last | 1490 | * numa_faults_locality tracks if faults recorded during the last |
1484 | * scan window were remote/local. The task scan period is adapted | 1491 | * scan window were remote/local. The task scan period is adapted |
1485 | * based on the locality of the faults with different weights | 1492 | * based on the locality of the faults with different weights |
@@ -1582,8 +1589,6 @@ extern void task_numa_fault(int last_node, int node, int pages, int flags); | |||
1582 | extern pid_t task_numa_group_id(struct task_struct *p); | 1589 | extern pid_t task_numa_group_id(struct task_struct *p); |
1583 | extern void set_numabalancing_state(bool enabled); | 1590 | extern void set_numabalancing_state(bool enabled); |
1584 | extern void task_numa_free(struct task_struct *p); | 1591 | extern void task_numa_free(struct task_struct *p); |
1585 | |||
1586 | extern unsigned int sysctl_numa_balancing_migrate_deferred; | ||
1587 | #else | 1592 | #else |
1588 | static inline void task_numa_fault(int last_node, int node, int pages, | 1593 | static inline void task_numa_fault(int last_node, int node, int pages, |
1589 | int flags) | 1594 | int flags) |