Commit 10922838 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds
Browse files

kernel/kthread.c: partial revert of 81c98869 ("kthread: ensure locality of...

kernel/kthread.c: partial revert of 81c98869 ("kthread: ensure locality of task_struct allocations")

After discussions with Tejun, we don't want to spread the use of
cpu_to_mem() (and thus knowledge of allocators/NUMA topology details) into
callers, but would rather ensure the callees correctly handle memoryless
nodes.  With the previous patches ("topology: add support for
node_to_mem_node() to determine the fallback node" and "slub: fallback to
node_to_mem_node() node if allocating on memoryless node") adding and
using node_to_mem_node(), we can safely undo part of the change to the
kthread logic from 81c98869


Signed-off-by: default avatarNishanth Aravamudan <>
Cc: Joonsoo Kim <>
Cc: David Rientjes <>
Cc: Han Pingtian <>
Cc: Pekka Enberg <>
Cc: Paul Mackerras <>
Cc: Benjamin Herrenschmidt <>
Cc: Michael Ellerman <>
Cc: Anton Blanchard <>
Cc: Christoph Lameter <>
Cc: Wanpeng Li <>
Cc: Tejun Heo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a561ce00
......@@ -369,7 +369,7 @@ struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),
struct task_struct *p;
p = kthread_create_on_node(threadfn, data, cpu_to_mem(cpu), namefmt,
p = kthread_create_on_node(threadfn, data, cpu_to_node(cpu), namefmt,
if (IS_ERR(p))
return p;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment