summaryrefslogtreecommitdiff
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorPeter Boonstoppel <pboonstoppel@nvidia.com>2012-07-19 14:58:10 -0700
committerSimone Willett <swillett@nvidia.com>2012-07-31 14:58:16 -0700
commit3e34666ada220c17362c25e0c19d2319db449662 (patch)
tree9be22a2b641eb524ef1e9064e9652932dfd5a693 /kernel/sched_debug.c
parent6308fd8ea1d7291835b3b689779a5b58ac0cf47a (diff)
kthread: disable preemption during complete()
After a kthread is created it signals the requester using complete() and enters TASK_UNINTERRUPTIBLE. However, since complete() wakes up the requesting thread this can cause a preemption. The preemption will not remove the task from the runqueue (for that schedule() has to be invoked directly). This is a problem if directly after kthread creation you try to do a kthread_bind(), which will block in HZ steps until the thread is off the runqueue. This patch disables preemption during complete(), since we call schedule() directly afterwards, so it will correctly enter TASK_UNINTERRUPTIBLE. This speeds up kthread creation/binding during cpu hotplug significantly. Change-Id: I856ddd4e01ebdb198ba90f343b4a0c5933fd2b23 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Diffstat (limited to 'kernel/sched_debug.c')
0 files changed, 0 insertions, 0 deletions