From: Ingo Molnar <mingo@redhat.com>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: bug in sched.c:activate_task()
Date: Tue, 5 Oct 2004 02:31:04 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0410050229380.31508@devserv.devel.redhat.com> (raw)
In-Reply-To: <200410050216.i952Gb620657@unix-os.sc.intel.com>
On Mon, 4 Oct 2004, Chen, Kenneth W wrote:
> Update p->timestamp to "now" in activate_task() doesn't look right to me
> at all. p->timestamp records last time it was running on a cpu.
> activate_task shouldn't update that variable when it queues a task on
> the runqueue.
correct, we are overriding it in schedule():
if (likely(prev != next)) {
next->timestamp = now;
rq->nr_switches++;
the line your patch removes is a remnant of an earlier logic when we
timestamped tasks when they touched the runqueue. (vs. timestamping when
they actually run on a CPU.) So the patch looks good to me. Andrew, please
apply.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo
>
> This bug (and combined with others) triggers improper load balancing.
>
> Patch against linux-2.6.9-rc3. Didn't diff it against 2.6.9-rc3-mm2
> because mm tree has so many change in sched.c.
>
> Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
>
>
> --- linux-2.6.9-rc3/kernel/sched.c.orig 2004-10-04 19:11:21.000000000 -0700
> +++ linux-2.6.9-rc3/kernel/sched.c 2004-10-04 19:11:35.000000000 -0700
> @@ -888,7 +888,6 @@ static void activate_task(task_t *p, run
> p->activated = 1;
> }
> }
> - p->timestamp = now;
>
> __activate_task(p, rq);
> }
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2004-10-05 6:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-05 2:16 Chen, Kenneth W
2004-10-05 2:34 ` Con Kolivas
2004-10-05 3:14 ` Nick Piggin
2004-10-05 4:45 ` Con Kolivas
2004-10-05 5:05 ` Peter Williams
2004-10-05 6:10 ` Nick Piggin
2004-10-05 6:31 ` Ingo Molnar [this message]
2004-10-05 6:36 ` Con Kolivas
2004-10-05 6:54 ` Ingo Molnar
2004-10-05 6:59 ` Con Kolivas
2004-10-05 7:08 ` Nick Piggin
2004-10-05 7:09 ` Ingo Molnar
2004-10-05 17:30 ` Chen, Kenneth W
2004-10-05 17:25 ` Chen, Kenneth W
2004-10-05 6:57 ` Nick Piggin
2004-10-05 8:19 ` Ingo Molnar
2004-10-05 17:44 ` Chen, Kenneth W
2004-10-05 22:46 Chen, Kenneth W
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=Pine.LNX.4.58.0410050229380.31508@devserv.devel.redhat.com \
--to=mingo@redhat.com \
--cc=akpm@osdl.org \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome