Skip to contentSkip to conversation

O13.1int

PATCH In review Con Kolivas 2 participants 2 messages Aug 5, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 O13.1int

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

kernel/sched.c +7 -4
@@ -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);
#1 lore raw
Quoted 2 lines · Con Kolivas

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.

This one is more "jumpy" (i.e., not as smooth as) than just the previous release. I have had to renice X back to -20 in order to get smooth window movements involving heavyweight CPU programs like Evolution.

Also, with X at -20, XMMS skips are still present, but they are a little bit shorter than with previous iterations.