aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-07 06:29:30 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 08:48:04 -0400
commitb32e86b4301e345611f0446265f782a229faadf6 (patch)
tree8cc0a8b731e63f2b3450f89330d49009374c99fb /include/linux/sched.h
parent7dbd13ed06513b047216a7ffc718bad9df0660f1 (diff)
sched/numa: Add debugging
Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: http://lkml.kernel.org/r/1381141781-10992-53-git-send-email-mgorman@suse.de
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f6385107c352..1127a46ac3d2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1366,6 +1366,7 @@ struct task_struct {
1366 unsigned long *numa_faults_buffer; 1366 unsigned long *numa_faults_buffer;
1367 1367
1368 int numa_preferred_nid; 1368 int numa_preferred_nid;
1369 unsigned long numa_pages_migrated;
1369#endif /* CONFIG_NUMA_BALANCING */ 1370#endif /* CONFIG_NUMA_BALANCING */
1370 1371
1371 struct rcu_head rcu; 1372 struct rcu_head rcu;
@@ -2661,6 +2662,11 @@ static inline unsigned int task_cpu(const struct task_struct *p)
2661 return task_thread_info(p)->cpu; 2662 return task_thread_info(p)->cpu;
2662} 2663}
2663 2664
2665static inline int task_node(const struct task_struct *p)
2666{
2667 return cpu_to_node(task_cpu(p));
2668}
2669
2664extern void set_task_cpu(struct task_struct *p, unsigned int cpu); 2670extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
2665 2671
2666#else 2672#else