[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070525114605.GA4023@elte.hu>
Date: Fri, 25 May 2007 13:46:05 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Andi Kleen <andi@...stfloor.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Satyam Sharma <satyam.sharma@...il.com>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [patch] sched_clock: fix preempt count imbalance
* Ingo Molnar <mingo@...e.hu> wrote:
> > > please send me your current sched-clock.c, i'll redo any remaining
> > > cleanups.
> >
> > It needs at least one new preliminary patch (to add on_cpu_single);
> > please get the series from
> > ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches-2.6.22-rc2-git7-070525-1.tar.gz
> > You need at least tsc-unstable upto paravirt-add-a-sched_clock-paravirt
> > for everything
>
> thanks.
>
> you missed one patch: please pick up the NUMAQ change i did too. (i
> kept the printk to make sure someone notices that and actually tests
> thing - i dont have a NUMAQ machine to try this on.)
>
> i'm looking at the other things now.
you introduced a crash-bug via your cleanups - the patch below fixes it.
Ingo
----------------------------->
Subject: [patch] sched_clock: fix preempt count imbalance
From: Ingo Molnar <mingo@...e.hu>
fix preempt count imbalance.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/i386/kernel/sched-clock.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: linux-cfs-2.6.22-rc2-mm1.q/arch/i386/kernel/sched-clock.c
===================================================================
--- linux-cfs-2.6.22-rc2-mm1.q.orig/arch/i386/kernel/sched-clock.c
+++ linux-cfs-2.6.22-rc2-mm1.q/arch/i386/kernel/sched-clock.c
@@ -164,7 +164,10 @@ static int sc_freq_event(struct notifier
void *data)
{
struct cpufreq_freqs *freq = data;
- struct sc_data *sc = &per_cpu(sc_data, freq->cpu);
+ struct sc_data *sc;
+
+ preempt_disable();
+ sc = &per_cpu(sc_data, freq->cpu);
if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
goto out;
@@ -194,7 +197,8 @@ static int sc_freq_event(struct notifier
break;
}
out:
- put_cpu();
+ preempt_enable();
+
return NOTIFY_DONE;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists