From: Con Kolivas <kernel@kolivas.org>
To: linux list <linux-kernel@vger.kernel.org>
Cc: ck list <ck@vds.kolivas.org>
Subject: [ckpatch][13/29] cfq-iso_idleprio_ionice.patch
Date: Sun, 18 Jun 2006 17:32:04 +1000 [thread overview]
Message-ID: <200606181732.04800.kernel@kolivas.org> (raw)
For SCHED_ISO and SCHED_IDLEPRIO tasks where no ioprio is explicitly set:
Set ioprio to best priority normal class for SCHED_ISO tasks.
Set ioprio to idle class for SCHED_IDLEPRIO tasks.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
---
block/cfq-iosched.c | 2 ++
include/linux/ioprio.h | 6 ++++++
2 files changed, 8 insertions(+)
Index: linux-ck-dev/include/linux/ioprio.h
===================================================================
--- linux-ck-dev.orig/include/linux/ioprio.h 2006-06-18 15:23:53.000000000 +1000
+++ linux-ck-dev/include/linux/ioprio.h 2006-06-18 15:23:56.000000000 +1000
@@ -56,6 +56,8 @@ static inline enum ioprio_class
{
if (rt_task(task))
return IOPRIO_CLASS_RT;
+ if (idleprio_task(task))
+ return IOPRIO_CLASS_IDLE;
return IOPRIO_CLASS_BE;
}
@@ -64,6 +66,10 @@ static inline int task_nice_ioprio(struc
if (rt_task(task))
return (MAX_RT_PRIO - task->rt_priority) * IOPRIO_BE_NR /
MAX_RT_PRIO;
+ if (iso_task(task))
+ return 0;
+ if (idleprio_task(task))
+ return IOPRIO_BE_NR - 1;
return (task_nice(task) + 20) / 5;
}
Index: linux-ck-dev/block/cfq-iosched.c
===================================================================
--- linux-ck-dev.orig/block/cfq-iosched.c 2006-06-18 15:23:53.000000000 +1000
+++ linux-ck-dev/block/cfq-iosched.c 2006-06-18 15:23:56.000000000 +1000
@@ -1358,6 +1358,8 @@ static void cfq_init_prio_data(struct cf
*/
cfqq->ioprio_class = task_policy_ioprio_class(tsk);
cfqq->ioprio = task_nice_ioprio(tsk);
+ if (cfqq->ioprio_class == IOPRIO_CLASS_IDLE)
+ cfq_clear_cfqq_idle_window(cfqq);
break;
case IOPRIO_CLASS_RT:
cfqq->ioprio = task_ioprio(tsk);
--
-ck
reply other threads:[~2006-06-18 7:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200606181732.04800.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=ck@vds.kolivas.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