Re: Horrendous Audio Stutter - current git

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Galbraith
Date: Friday, May 2, 2008 - 12:27 pm

On Fri, 2008-05-02 at 20:53 +0200, Frans Pop wrote:

Hm. I enabled group scheduling, with Peter's patch + revert of the
commit that is giving me grief + the below, and it seems to work ok
here.  Definitely no sound skips even under quite hefty load.

The below _seems_ to make a difference stand-alone, but subjective
things like 'lurches' require _very_ much testing... you tend to see
what you want to see with such things.  As you can see, I thought about
submitting it, but I have way too much subjective poison in my system
from testing this and that while reading source.

Fix undesirable rq.clock update noops.

Signed-off-by: Mike Galbraith <efault@gmx.de>

Index: linux-2.6.26.git/kernel/sched.c
===================================================================
--- linux-2.6.26.git.orig/kernel/sched.c
+++ linux-2.6.26.git/kernel/sched.c
@@ -668,9 +668,6 @@ static void __update_rq_clock(struct rq 
 	s64 delta = now - prev_raw;
 	u64 clock = rq->clock;
 
-#ifdef CONFIG_SCHED_DEBUG
-	WARN_ON_ONCE(cpu_of(rq) != smp_processor_id());
-#endif
 	/*
 	 * Protect against sched_clock() occasionally going backwards:
 	 */
@@ -3009,8 +3006,8 @@ static void double_rq_lock(struct rq *rq
 			spin_lock(&rq1->lock);
 		}
 	}
-	update_rq_clock(rq1);
-	update_rq_clock(rq2);
+	__update_rq_clock(rq1);
+	__update_rq_clock(rq2);
 }
 
 /*
@@ -3860,7 +3857,7 @@ redo:
 		/* Attempt to move tasks */
 		double_lock_balance(this_rq, busiest);
 		/* this_rq->clock is already updated */
-		update_rq_clock(busiest);
+		__update_rq_clock(busiest);
 		ld_moved = move_tasks(this_rq, this_cpu, busiest,
 					imbalance, sd, CPU_NEWLY_IDLE,
 					&all_pinned);
@@ -3959,8 +3956,8 @@ static void active_load_balance(struct r
 
 	/* move a task from busiest_rq to target_rq */
 	double_lock_balance(busiest_rq, target_rq);
-	update_rq_clock(busiest_rq);
-	update_rq_clock(target_rq);
+	__update_rq_clock(busiest_rq);
+	__update_rq_clock(target_rq);
 
 	/* Search for an sd spanning us and the target CPU. */
 	for_each_domain(target_cpu, sd) {
Index: linux-2.6.26.git/kernel/sched_fair.c
===================================================================
--- linux-2.6.26.git.orig/kernel/sched_fair.c
+++ linux-2.6.26.git/kernel/sched_fair.c
@@ -1221,7 +1221,7 @@ static void check_preempt_wakeup(struct 
 	int se_depth, pse_depth;
 
 	if (unlikely(rt_prio(p->prio))) {
-		update_rq_clock(rq);
+		__update_rq_clock(rq);
 		update_curr(cfs_rq);
 		resched_task(curr);
 		return;


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

Messages in current thread:
Horrendous Audio Stutter - current git, Parag Warudkar, (Thu May 1, 5:14 pm)
Re: Horrendous Audio Stutter - current git, Peter Zijlstra, (Fri May 2, 1:34 am)
Re: 'global' rq-&gt;clock, Arjan van de Ven, (Fri May 2, 3:09 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 3:32 am)
Re: Horrendous Audio Stutter - current git, Peter Zijlstra, (Fri May 2, 3:35 am)
Re: Horrendous Audio Stutter - current git, Peter Zijlstra, (Fri May 2, 4:08 am)
Re: Horrendous Audio Stutter - current git, Parag Warudkar, (Fri May 2, 4:10 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 4:37 am)
Re: Horrendous Audio Stutter - current git, Peter Zijlstra, (Fri May 2, 4:39 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 4:45 am)
Re: Horrendous Audio Stutter - current git, Peter Zijlstra, (Fri May 2, 4:51 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 5:06 am)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Fri May 2, 5:09 am)
Re: Horrendous Audio Stutter - current git, Parag Warudkar, (Fri May 2, 5:21 am)
Re: Horrendous Audio Stutter - current git, Parag Warudkar, (Fri May 2, 5:22 am)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Fri May 2, 5:37 am)
Re: Horrendous Audio Stutter - current git, Dhaval Giani, (Fri May 2, 6:21 am)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Fri May 2, 8:02 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 8:49 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Fri May 2, 11:53 am)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Fri May 2, 12:27 pm)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Fri May 2, 12:38 pm)
Re: 'global' rq-&gt;clock, David Miller, (Fri May 2, 2:48 pm)
Re: 'global' rq-&gt;clock, David Miller, (Fri May 2, 3:00 pm)
Re: 'global' rq-&gt;clock, Peter Zijlstra, (Fri May 2, 3:07 pm)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Sat May 3, 12:13 am)
Re: Horrendous Audio Stutter - current git, Mike Galbraith, (Sat May 3, 12:39 am)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 1:28 am)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 2:05 am)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 3:10 am)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 12:27 pm)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 12:28 pm)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 12:37 pm)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 12:39 pm)
Re: 'global' rq-&gt;clock, Benjamin Herrenschmidt, (Sat May 3, 3:30 pm)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 3:38 pm)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 4:04 pm)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 4:36 pm)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 4:38 pm)
Re: 'global' rq-&gt;clock, David Miller, (Sat May 3, 4:40 pm)
Re: 'global' rq-&gt;clock, Ingo Molnar, (Sat May 3, 4:47 pm)
Re: 'global' rq-&gt;clock, Benjamin Herrenschmidt, (Sat May 3, 7:22 pm)
Re: 'global' rq-&gt;clock, Peter Zijlstra, (Sun May 4, 5:12 am)
Re: Horrendous Audio Stutter - current git, Frans Pop, (Wed May 7, 1:26 am)
Re: Horrendous Audio Stutter - current git, Ingo Molnar, (Wed May 7, 1:32 am)