Commit 8df185a95c9b84fc0c3c02224e64fdc5b83bae34

Authored by Mike Travis
Committed by Ingo Molnar
1 parent 8b95d9172b

kthread: reduce stack pressure in create_kthread and kthreadd

* Replace:

  	set_cpus_allowed(..., CPU_MASK_ALL)

    with:

  	set_cpus_allowed_ptr(..., CPU_MASK_ALL_PTR)

    to remove excessive stack requirements when NR_CPUS=4096.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -106,7 +106,7 @@
106 106 */
107 107 sched_setscheduler(create->result, SCHED_NORMAL, &param);
108 108 set_user_nice(create->result, KTHREAD_NICE_LEVEL);
109   - set_cpus_allowed(create->result, CPU_MASK_ALL);
  109 + set_cpus_allowed_ptr(create->result, CPU_MASK_ALL_PTR);
110 110 }
111 111 complete(&create->done);
112 112 }
... ... @@ -233,7 +233,7 @@
233 233 set_task_comm(tsk, "kthreadd");
234 234 ignore_signals(tsk);
235 235 set_user_nice(tsk, KTHREAD_NICE_LEVEL);
236   - set_cpus_allowed(tsk, CPU_MASK_ALL);
  236 + set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR);
237 237  
238 238 current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
239 239