[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47D09BCA.9050504@cn.fujitsu.com>
Date: Fri, 07 Mar 2008 09:35:06 +0800
From: Miao Xie <miaox@...fujitsu.com>
To: Ingo Molnar <mingo@...e.hu>
CC: linux-kernel@...r.kernel.org
Subject: [PATCH] sched: fix the wrong time slice value for SCHED_FIFO tasks
Function sys_sched_rr_get_interval returns wrong time slice value for
SCHED_FIFO tasks. The time slice for SCHED_FIFO tasks should be 0.
Signed-off-by: Miao Xie <miaox@...fujitsu.com>
---
kernel/sched.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index dcd553c..870044d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5100,7 +5100,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval)
time_slice = 0;
if (p->policy == SCHED_RR) {
time_slice = DEF_TIMESLICE;
- } else {
+ } else if (p->policy != SCHED_FIFO) {
struct sched_entity *se = &p->se;
unsigned long flags;
struct rq *rq;
--
1.5.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists