diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 13:42:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 13:42:08 -0500 |
commit | a0fa1dd3cdbccec9597fe53b6177a9aa6e20f2f8 (patch) | |
tree | b249854573815eedf377e554f0ea516f86411841 /kernel/fork.c | |
parent | 9326657abe1a83ed4b4f396b923ca1217fd50cba (diff) | |
parent | eaad45132c564ce377e6dce05e78e08e456d5315 (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler changes from Ingo Molnar:
- Add the initial implementation of SCHED_DEADLINE support: a real-time
scheduling policy where tasks that meet their deadlines and
periodically execute their instances in less than their runtime quota
see real-time scheduling and won't miss any of their deadlines.
Tasks that go over their quota get delayed (Available to privileged
users for now)
- Clean up and fix preempt_enable_no_resched() abuse all around the
tree
- Do sched_clock() performance optimizations on x86 and elsewhere
- Fix and improve auto-NUMA balancing
- Fix and clean up the idle loop
- Apply various cleanups and fixes
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits)
sched: Fix __sched_setscheduler() nice test
sched: Move SCHED_RESET_ON_FORK into attr::sched_flags
sched: Fix up attr::sched_priority warning
sched: Fix up scheduler syscall LTP fails
sched: Preserve the nice level over sched_setscheduler() and sched_setparam() calls
sched/core: Fix htmldocs warnings
sched/deadline: No need to check p if dl_se is valid
sched/deadline: Remove unused variables
sched/deadline: Fix sparse static warnings
m68k: Fix build warning in mac_via.h
sched, thermal: Clean up preempt_enable_no_resched() abuse
sched, net: Fixup busy_loop_us_clock()
sched, net: Clean up preempt_enable_no_resched() abuse
sched/preempt: Fix up missed PREEMPT_NEED_RESCHED folding
sched/preempt, locking: Rework local_bh_{dis,en}able()
sched/clock, x86: Avoid a runtime condition in native_sched_clock()
sched/clock: Fix up clear_sched_clock_stable()
sched/clock, x86: Use a static_key for sched_clock_stable
sched/clock: Remove local_irq_disable() from the clocks
sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs
...
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index dfa736c98d17..294189fc7ac8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1087,8 +1087,10 @@ static void rt_mutex_init_task(struct task_struct *p) | |||
1087 | { | 1087 | { |
1088 | raw_spin_lock_init(&p->pi_lock); | 1088 | raw_spin_lock_init(&p->pi_lock); |
1089 | #ifdef CONFIG_RT_MUTEXES | 1089 | #ifdef CONFIG_RT_MUTEXES |
1090 | plist_head_init(&p->pi_waiters); | 1090 | p->pi_waiters = RB_ROOT; |
1091 | p->pi_waiters_leftmost = NULL; | ||
1091 | p->pi_blocked_on = NULL; | 1092 | p->pi_blocked_on = NULL; |
1093 | p->pi_top_task = NULL; | ||
1092 | #endif | 1094 | #endif |
1093 | } | 1095 | } |
1094 | 1096 | ||
@@ -1311,7 +1313,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1311 | #endif | 1313 | #endif |
1312 | 1314 | ||
1313 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1315 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
1314 | sched_fork(clone_flags, p); | 1316 | retval = sched_fork(clone_flags, p); |
1317 | if (retval) | ||
1318 | goto bad_fork_cleanup_policy; | ||
1315 | 1319 | ||
1316 | retval = perf_event_init_task(p); | 1320 | retval = perf_event_init_task(p); |
1317 | if (retval) | 1321 | if (retval) |
@@ -1403,13 +1407,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1403 | p->tgid = p->pid; | 1407 | p->tgid = p->pid; |
1404 | } | 1408 | } |
1405 | 1409 | ||
1406 | p->pdeath_signal = 0; | ||
1407 | p->exit_state = 0; | ||
1408 | |||
1409 | p->nr_dirtied = 0; | 1410 | p->nr_dirtied = 0; |
1410 | p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10); | 1411 | p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10); |
1411 | p->dirty_paused_when = 0; | 1412 | p->dirty_paused_when = 0; |
1412 | 1413 | ||
1414 | p->pdeath_signal = 0; | ||
1413 | INIT_LIST_HEAD(&p->thread_group); | 1415 | INIT_LIST_HEAD(&p->thread_group); |
1414 | p->task_works = NULL; | 1416 | p->task_works = NULL; |
1415 | 1417 | ||