Hi, thanks for the patch! I'll put this on our testing boxes... Are You going to push this upstream so we can ask Greg to push this to -stable? or do You plan to wait for more complex patch? n.
On Thu, Jul 21, 2011 at 02:24:58PM +0200, Peter Zijlstra wrote: > On Thu, 2011-07-21 at 09:22 +0200, Ingo Molnar wrote: > > > > Ping, what's going on with this bug? Systems are crashing so we need > > a quick fix ASAP ... > > Something as simple as the below ought to cure things for now. Once we > get __cycles_2_ns() fixed up we can enable it again. > > (patch against -tip, .32 code is different but equally simple to fix) > > --- > Subject: x86, intel: Don't mark sched_clock() as stable > > Because the x86 sched_clock() implementation wraps at 54 bits and the > scheduler code assumes it wraps at the full 64bits we can get into > trouble after 208 days (~7 months) of uptime. > > Signed-off-by: Peter Zijlstra <a.p.zijls...@chello.nl> > --- > arch/x86/kernel/cpu/intel.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c > index ed6086e..c8dc48b 100644 > --- a/arch/x86/kernel/cpu/intel.c > +++ b/arch/x86/kernel/cpu/intel.c > @@ -91,8 +91,15 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 > *c) > if (c->x86_power & (1 << 8)) { > set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); > set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); > + /* > + * Unfortunately our __cycles_2_ns() implementation makes > + * the raw sched_clock() interface wrap at 54-bits, which > + * makes it unsuitable for direct use, so disable this > + * for now. > + * > if (!check_tsc_unstable()) > sched_clock_stable = 1; > + */ > } > > /* > > -- ------------------------------------- Ing. Nikola CIPRICH LinuxBox.cz, s.r.o. 28. rijna 168, 709 01 Ostrava tel.: +420 596 603 142 fax: +420 596 621 273 mobil: +420 777 093 799 www.linuxbox.cz mobil servis: +420 737 238 656 email servis: ser...@linuxbox.cz -------------------------------------
pgp8V5Hyd1hOO.pgp
Description: PGP signature
_______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable