From: Peter Zijlstra <peterz@infradead.org>
To: marywangran <marywangran@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: make sure sched_child_runs_first WORK
Date: Tue, 28 Apr 2009 13:53:32 +0200 [thread overview]
Message-ID: <1240919612.7620.155.camel@twins> (raw)
In-Reply-To: <e82940b20904280426j53ff8be7h3caeed84a02bbfe9@mail.gmail.com>
On Tue, 2009-04-28 at 19:26 +0800, marywangran wrote:
> Signed-off-by: Ya Zhao <marywangran@gmail.com>
> ---
> --- linux-2.6.28.1/kernel/sched_fair.c.orig 2009-04-28
> 22:26:00.000000000 +0800
> +++ linux-2.6.28.1/kernel/sched_fair.c 2009-04-28 22:34:49.000000000 +0800
> @@ -1628,12 +1628,13 @@ static void task_new_fair(struct rq *rq,
>
> /* 'curr' will be NULL if the child belongs to a different group */
> if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
> - curr && curr->vruntime < se->vruntime) {
> + curr){
> /*
> * Upon rescheduling, sched_class::put_prev_task() will place
> * 'current' within the tree based on its new key value.
> */
> - swap(curr->vruntime, se->vruntime);
> + if( curr->vruntime < se->vruntime )
> + swap(curr->vruntime, se->vruntime);
> resched_task(rq->curr);
> }
Aside from the style issue the patch seems sensible enough.
Thing is, do we really care about child runs first?
next prev parent reply other threads:[~2009-04-28 11:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 11:21 [PATCH] sched: make sure sched_child_runs_first WORK marywangran
2009-04-28 11:26 ` marywangran
2009-04-28 11:53 ` Peter Zijlstra [this message]
[not found] ` <e82940b20904280655j6b7208f6jff8bbdef290d9872@mail.gmail.com>
2009-04-28 14:01 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240919612.7620.155.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marywangran@gmail.com \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.