Skip to contentSkip to conversation

More PI issues with -rt

PATCH Dinakar Guniguntala 1 participant 2 messages Nov 24, 2005 – Dec 7, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I found that PI boosted SCHED_OTHER tasks behave like they have SCHED_FIFO policy, while PI boosted SCHED_RR tasks continue to behave like they have SCHED_RR policy. This didn't seem right

Does something like the following patch make sense?

-Dinakar

kernel/sched.c +2 -1
Index: linux-2.6.14/kernel/sched.c
===================================================================
@@ -2986,8 +2986,9 @@
 		 * On PREEMPT_RT, boosted tasks will also get into this
 		 * branch and wont get their timeslice decreased until
 		 * they have done their work.
+		 * Boosted SCHED_OTHER tasks round-robin as well
 		 */
-		if ((p->policy == SCHED_RR) && !--p->time_slice) {
+		if ((p->policy != SCHED_FIFO) && !--p->time_slice) {
 			p->time_slice = task_timeslice(p);
 			p->first_time_slice = 0;
 			set_tsk_need_resched(p);
#1 lore raw

Ingo/David,

Resending this as I did not get any reply.
This time I am attaching the testcases where I am noticing this Any feedback is appreciated

-Dinakar

Quoted 27 lines · Dinakar Guniguntala

Hi,

I found that PI boosted SCHED_OTHER tasks behave like they have SCHED_FIFO policy, while PI boosted SCHED_RR tasks continue to behave like they have SCHED_RR policy. This didn't seem right

Does something like the following patch make sense?

-Dinakar

Index: linux-2.6.14/kernel/sched.c
===================================================================

kernel/sched.c +2 -1
@@ -2986,8 +2986,9 @@
 		 * On PREEMPT_RT, boosted tasks will also get into this
 		 * branch and wont get their timeslice decreased until
 		 * they have done their work.
+		 * Boosted SCHED_OTHER tasks round-robin as well
 		 */
-		if ((p->policy == SCHED_RR) && !--p->time_slice) {
+		if ((p->policy != SCHED_FIFO) && !--p->time_slice) {
 			p->time_slice = task_timeslice(p);
 			p->first_time_slice = 0;
 			set_tsk_need_resched(p);