[patch 2/2] Let process accouting trust sched_clock.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Jan Glauber <jan.glauber@...>, Martin Schwidefsky <schwidefsky@...>, <linux-kernel@...>
Date: Thursday, August 23, 2007 - 3:29 pm

Currently the scheduler does sanity checking on sched_clock and corrects
the values. Remove some of these checks to make steal time influence the
process time.  
This patch is probably nothing for upstream but with this patch the
accouting for s390 seems to work regarding steal time, even without
CONFIG_VIRT_CPU_TIME (as long as CONFIG_VIRT_TIMER is y).

---
 kernel/sched.c |    6 ------
 1 file changed, 6 deletions(-)

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -3310,19 +3310,13 @@ void account_steal_time(struct task_stru
 void scheduler_tick(void)
 {
 	int cpu = smp_processor_id();
 	struct rq *rq = cpu_rq(cpu);
 	struct task_struct *curr = rq->curr;
-	u64 next_tick = rq->tick_timestamp + TICK_NSEC;
 
 	spin_lock(&rq->lock);
 	__update_rq_clock(rq);
-	/*
-	 * Let rq->clock advance by at least TICK_NSEC:
-	 */
-	if (unlikely(rq->clock < next_tick))
-		rq->clock = next_tick;
 	rq->tick_timestamp = rq->clock;
 	update_cpu_load(rq);
 	if (curr != rq->idle) /* FIXME: needed? */
 		curr->sched_class->task_tick(rq, curr);
 	spin_unlock(&rq->lock);

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/2] s390 related scheduler patches and questions, Christian Borntraeger, (Thu Aug 23, 3:26 pm)
[patch 2/2] Let process accouting trust sched_clock., Christian Borntraeger, (Thu Aug 23, 3:29 pm)
[patch 1/2] virtual sched_clock() for s390, Christian Borntraeger, (Thu Aug 23, 3:28 pm)