소스 검색

sched: group scheduler, fix latency

There is a possibility that because of task of a group moving from one
cpu to another, it may gain more cpu time that desired. See 
http://marc.info/?l=linux-kernel&m=119073197730334 for details.

This is an attempt to fix that problem. Basically it simulates dequeue
of higher level entities as if they are going to sleep. Similarly it
simulate wakeup of higher level entities as if they are waking up from
sleep.

Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Srivatsa Vaddagiri 18 년 전
부모
커밋
b9fa3df33f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      kernel/sched_fair.c

+ 2 - 0
kernel/sched_fair.c

@@ -727,6 +727,7 @@ static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int wakeup)
 			break;
 			break;
 		cfs_rq = cfs_rq_of(se);
 		cfs_rq = cfs_rq_of(se);
 		enqueue_entity(cfs_rq, se, wakeup);
 		enqueue_entity(cfs_rq, se, wakeup);
+		wakeup = 1;
 	}
 	}
 }
 }
 
 
@@ -746,6 +747,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep)
 		/* Don't dequeue parent if it has other entities besides us */
 		/* Don't dequeue parent if it has other entities besides us */
 		if (cfs_rq->load.weight)
 		if (cfs_rq->load.weight)
 			break;
 			break;
+		sleep = 1;
 	}
 	}
 }
 }