From: Eric Wong <eric@yhbt.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] sched-2.5.64-bk10-C4
Date: Thu, 20 Mar 2003 16:44:09 -0800 [thread overview]
Message-ID: <20030321004409.GA16206@bl4st.yhbt.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0303161213200.4930-100000@localhost.localdomain>
Ingo Molnar <mingo@elte.hu> wrote:
>
> the attached patch fixes a fundamental (and long-standing) bug in the
> sleep-average estimator which is the root cause of the "contest
> process_load" problems reported by Mike Galbraith and Andrew Morton, and
> which problem is addressed by Mike's patch.
> --- linux/kernel/sched.c.orig
> +++ linux/kernel/sched.c
> @@ -342,10 +342,10 @@ static inline void __activate_task(task_
> */
> static inline int activate_task(task_t *p, runqueue_t *rq)
> {
> - unsigned long sleep_time = jiffies - p->last_run;
> + long sleep_time = jiffies - p->last_run - 1;
> int requeue_waker = 0;
>
> - if (sleep_time) {
> + if (sleep_time > 0) {
> int sleep_avg;
>
> /*
>
Would this be an equivalent fix for 2.4.20-ck4?
--- kernel/sched.c 2003-03-20 16:33:07.000000000 -0800
+++ kernel/sched.c.orig 2003-03-20 16:38:51.000000000 -0800
@@ -307,10 +286,10 @@
static inline void activate_task(task_t *p, runqueue_t *rq)
{
- long sleep_time = jiffies - p->sleep_timestamp - 1;
+ unsigned long sleep_time = jiffies - p->sleep_timestamp;
prio_array_t *array = rq->active;
- if (!rt_task(p) && (sleep_time > 0)) {
+ if (!rt_task(p) && sleep_time) {
/*
* This code gives a bonus to interactive tasks. We update
* an 'average sleep time' value here, based on
--
Eric Wong
next prev parent reply other threads:[~2003-03-21 0:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-16 11:24 Ingo Molnar
2003-03-16 16:00 ` [patch] sched-2.5.64-bk10-D0 Ingo Molnar
2003-03-21 0:44 ` Eric Wong [this message]
2003-03-21 1:57 ` [patch] sched-2.5.64-bk10-C4 Con Kolivas
2003-03-21 5:30 ` Ingo Molnar
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=20030321004409.GA16206@bl4st.yhbt.net \
--to=eric@yhbt.net \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®