aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-03-22 19:30:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:44:01 -0400
commit207205a2ba2655652fe46a60b49838af6c16a919 (patch)
tree4309aa7cd5cf39c805219001e0ed8ec5b71e4d5e /include/linux/sched.h
parentb6a84016bd2598e35ead635147fa53619982648d (diff)
kthread: NUMA aware kthread_create_on_node()
All kthreads being created from a single helper task, they all use memory from a single node for their kernel stack and task struct. This patch suite creates kthread_create_on_node(), adding a 'cpu' parameter to parameters already used by kthread_create(). This parameter serves in allocating memory for the new kthread on its memory node if possible. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Reviewed-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Tejun Heo <tj@kernel.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c15936fe998b..4b601be3dace 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1471,6 +1471,7 @@ struct task_struct {
1471#ifdef CONFIG_NUMA 1471#ifdef CONFIG_NUMA
1472 struct mempolicy *mempolicy; /* Protected by alloc_lock */ 1472 struct mempolicy *mempolicy; /* Protected by alloc_lock */
1473 short il_next; 1473 short il_next;
1474 short pref_node_fork;
1474#endif 1475#endif
1475 atomic_t fs_excl; /* holding fs exclusive resources */ 1476 atomic_t fs_excl; /* holding fs exclusive resources */
1476 struct rcu_head rcu; 1477 struct rcu_head rcu;