From: Con Kolivas <kernel@kolivas.org>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] O13.1int
Date: Tue, 5 Aug 2003 10:17:55 +1000 [thread overview]
Message-ID: <200308051017.55616.kernel@kolivas.org> (raw)
A heck of a lot fairer on disk only tasks; lets them earn sleep avg up to just
interactive state so they stay on the active array.
Con
--- linux-2.6.0-test2-mm4-O13/kernel/sched.c 2003-08-05 10:08:15.000000000 +1000
+++ linux-2.6.0-test2-mm4-O13.1/kernel/sched.c 2003-08-05 09:58:55.000000000 +1000
@@ -584,13 +584,16 @@ repeat_lock_task:
goto repeat_lock_task;
}
if (old_state == TASK_UNINTERRUPTIBLE){
+ rq->nr_uninterruptible--;
/*
* Tasks on involuntary sleep don't earn
- * sleep_avg
+ * sleep_avg beyond just interactive state.
*/
- rq->nr_uninterruptible--;
- p->timestamp = sched_clock();
- p->activated = -1;
+ if (NS_TO_JIFFIES(p->sleep_avg) >=
+ JUST_INTERACTIVE_SLEEP(p)){
+ p->timestamp = sched_clock();
+ p->activated = -1;
+ }
}
if (sync)
__activate_task(p, rq);
next reply other threads:[~2003-08-05 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-05 0:17 Con Kolivas [this message]
2003-08-05 7:31 ` [PATCH] O13.1int Felipe Alfaro Solana
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=200308051017.55616.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--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