Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64654
b: refs/heads/master
c: 7109c44
h: refs/heads/master
v: v3
  • Loading branch information
Ting Yang authored and Ingo Molnar committed Aug 28, 2007
1 parent f6b1d0e commit 2f08bab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: f6cf891c4d7128f9f91243fc0b9ce99e10fa1586
refs/heads/master: 7109c4429af3640f79a638f177fc5d05b9807149
5 changes: 3 additions & 2 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,18 +1094,19 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr)
static void task_new_fair(struct rq *rq, struct task_struct *p)
{
struct cfs_rq *cfs_rq = task_cfs_rq(p);
struct sched_entity *se = &p->se;
struct sched_entity *se = &p->se, *curr = cfs_rq_curr(cfs_rq);

sched_info_queued(p);

update_curr(cfs_rq);
update_stats_enqueue(cfs_rq, se);
/*
* Child runs first: we let it run before the parent
* until it reschedules once. We set up the key so that
* it will preempt the parent:
*/
p->se.fair_key = current->se.fair_key -
niced_granularity(&rq->curr->se, sched_granularity(cfs_rq)) - 1;
niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
/*
* The first wait is dominated by the child-runs-first logic,
* so do not credit it with that waiting time yet:
Expand Down

0 comments on commit 2f08bab

Please sign in to comment.