Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73407
b: refs/heads/master
c: 3c90e6e
h: refs/heads/master
i:
  73405: f29c9e1
  73403: 05e05b2
  73399: 7a98f08
  73391: a7814db
  73375: 1063f92
  73343: 0e75578
v: v3
  • Loading branch information
Srivatsa Vaddagiri authored and Ingo Molnar committed Nov 9, 2007
1 parent c4547c1 commit 56ec095
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 502d26b524d8980f3ed80d9aec398e85671a8160
refs/heads/master: 3c90e6e99b08f01d5684a3a07cceae6a543e4fa8
6 changes: 3 additions & 3 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
p->blocked_on = NULL; /* not blocked yet */
#endif

/* Perform scheduler related setup. Assign this task to a CPU. */
sched_fork(p, clone_flags);

if ((retval = security_task_alloc(p)))
goto bad_fork_cleanup_policy;
if ((retval = audit_alloc(p)))
Expand Down Expand Up @@ -1212,9 +1215,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
INIT_LIST_HEAD(&p->ptrace_children);
INIT_LIST_HEAD(&p->ptrace_list);

/* Perform scheduler related setup. Assign this task to a CPU. */
sched_fork(p, clone_flags);

/* Now that the task is set up, run cgroup callbacks if
* necessary. We need to run them before the task is visible
* on the tasklist. */
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,9 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
update_curr(cfs_rq);
place_entity(cfs_rq, se, 1);

/* 'curr' will be NULL if the child belongs to a different group */
if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
curr->vruntime < se->vruntime) {
curr && curr->vruntime < se->vruntime) {
/*
* Upon rescheduling, sched_class::put_prev_task() will place
* 'current' within the tree based on its new key value.
Expand Down

0 comments on commit 56ec095

Please sign in to comment.