CINXE.COM

LKML: Ingo Molnar: Re: 2.6.12-rc2-mm1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>LKML: Ingo Molnar: Re: 2.6.12-rc2-mm1</title><link href="/css/message.css" rel="stylesheet" type="text/css" /><link href="/css/wrap.css" rel="alternate stylesheet" type="text/css" title="wrap" /><link href="/css/nowrap.css" rel="stylesheet" type="text/css" title="nowrap" /><link href="/favicon.ico" rel="shortcut icon" /><script src="/js/simple-calendar.js" type="text/javascript"></script><script src="/js/styleswitcher.js" type="text/javascript"></script><link rel="alternate" type="application/rss+xml" title="lkml.org : last 100 messages" href="/rss.php" /><link rel="alternate" type="application/rss+xml" title="lkml.org : last messages by Ingo Molnar" href="/groupie.php?aid=18" /><!--Matomo--><script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setDoNotTrack", true]); _paq.push(["disableCookies"]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//m.lkml.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script><!--End Matomo Code--></head><body onload="es.jasper.simpleCalendar.init();" itemscope="itemscope" itemtype="http://schema.org/BlogPosting"><table border="0" cellpadding="0" cellspacing="0"><tr><td width="180" align="center"><a href="/"><img style="border:0;width:135px;height:32px" src="/images/toprowlk.gif" alt="lkml.org" /></a></td><td width="32">聽</td><td class="nb"><div><a class="nb" href="/lkml"> [lkml]</a> 聽 <a class="nb" href="/lkml/2005"> [2005]</a> 聽 <a class="nb" href="/lkml/2005/4"> [Apr]</a> 聽 <a class="nb" href="/lkml/2005/4/5"> [5]</a> 聽 <a class="nb" href="/lkml/last100"> [last100]</a> 聽 <a href="/rss.php"><img src="/images/rss-or.gif" border="0" alt="RSS Feed" /></a></div><div>Views: <a href="#" class="nowrap" onclick="setActiveStyleSheet('wrap');return false;">[wrap]</a><a href="#" class="wrap" onclick="setActiveStyleSheet('nowrap');return false;">[no wrap]</a> 聽 <a class="nb" href="/lkml/mheaders/2005/4/5/266" onclick="this.href='/lkml/headers'+'/2005/4/5/266';">[headers]</a>聽 <a href="/lkml/bounce/2005/4/5/266">[forward]</a>聽 </div></td><td width="32">聽</td></tr><tr><td valign="top"><div class="es-jasper-simpleCalendar" baseurl="/lkml/"></div><div class="threadlist">Messages in this thread</div><ul class="threadlist"><li class="root"><a href="/lkml/2005/4/5/30">First message in thread</a></li><li><a href="/lkml/2005/4/5/68">Ingo Molnar</a><ul><li><a href="/lkml/2005/4/5/71">Brice Goglin</a><ul><li class="origin"><a href="/lkml/2005/4/6/55">Ingo Molnar</a><ul><li><a href="/lkml/2005/4/6/55">Brice Goglin</a></li></ul></li></ul></li></ul></li></ul><div class="threadlist">Patch in this message</div><ul class="threadlist"><li><a href="/lkml/diff/2005/4/5/266/1">Get diff 1</a></li></ul></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerl.gif" width="32" height="32" alt="/" /></td><td class="c" rowspan="2" valign="top" style="padding-top: 1em"><table><tr><td><table><tr><td class="lp">Date</td><td class="rp" itemprop="datePublished">Tue, 5 Apr 2005 20:34:13 +0200</td></tr><tr><td class="lp">From</td><td class="rp" itemprop="author">Ingo Molnar &lt;&gt;</td></tr><tr><td class="lp">Subject</td><td class="rp" itemprop="name">Re: 2.6.12-rc2-mm1</td></tr></table></td><td></td></tr></table><pre itemprop="articleBody"><br />* Brice Goglin &lt;Brice.Goglin&#64;ens-lyon.org&gt; wrote:<br /><br />&gt; &gt;could you send the full bootlog (starting at the 'gcc...' line)? I'm not <br />&gt; &gt;sure whether TSC calibration was done on your CPU. If cyc2ns_scale is <br />&gt; &gt;not set up then sched_clock() will return 0, and this could result in <br />&gt; &gt;that printk symptom.<br />&gt; <br />&gt; Here you are.<br /><br />weird - none of the WARN_ON(1)'s show up. In particular, the <br />sched_clock() ones should have triggered at least once! I've attached a <br />new version of the patch below (please unapply the previous patch), <br />could you try it and send me the log? (It will unconditionally print <br />something in tsc_init(), which is always called during the boot <br />process.)<br /><br /> Ingo<br /><br />--- linux/arch/i386/kernel/timers/timer_tsc.c.orig<br />+++ linux/arch/i386/kernel/timers/timer_tsc.c<br />&#64;&#64; -137,16 +137,15 &#64;&#64; static unsigned long long monotonic_cloc<br /> unsigned long long sched_clock(void)<br /> {<br /> unsigned long long this_offset;<br />+ static int once = 1;<br /> <br />- /*<br />- * In the NUMA case we dont use the TSC as they are not<br />- * synchronized across all CPUs.<br />- */<br />-#ifndef CONFIG_NUMA<br />- if (!use_tsc)<br />-#endif<br />+ if (!cpu_has_tsc) {<br />+ if (once) { once = 0; WARN_ON(1); }<br /> /* no locking but a rare wrong value is not a big deal */<br /> return jiffies_64 * (1000000000 / HZ);<br />+ }<br />+<br />+ if (once) { once = 0; WARN_ON(1); }<br /> <br /> /* Read the Time Stamp Counter */<br /> rdtscll(this_offset);<br />&#64;&#64; -434,7 +433,8 &#64;&#64; static void mark_offset_tsc(void)<br /> <br /> static int __init init_tsc(char* override)<br /> {<br />-<br />+ printk("TSC init.\n");<br />+ WARN_ON(1);<br /> /* check clock override */<br /> if (override[0] &amp;&amp; strncmp(override,"tsc",3)) {<br /> #ifdef CONFIG_HPET_TIMER<br />&#64;&#64; -443,6 +443,7 &#64;&#64; static int __init init_tsc(char* overrid<br /> } else<br /> #endif<br /> {<br />+ WARN_ON(1);<br /> return -ENODEV;<br /> }<br /> }<br />&#64;&#64; -518,8 +519,10 &#64;&#64; static int __init init_tsc(char* overrid<br /> }<br /> set_cyc2ns_scale(cpu_khz/1000);<br /> return 0;<br />- }<br />+ } else<br />+ WARN_ON(1);<br /> }<br />+ WARN_ON(1);<br /> return -ENODEV;<br /> }<br /> <br />&#64;&#64; -528,12 +531,14 &#64;&#64; static int __init init_tsc(char* overrid<br /> * in cpu/common.c */<br /> static int __init tsc_setup(char *str)<br /> {<br />+ WARN_ON(1);<br /> tsc_disable = 1;<br /> return 1;<br /> }<br /> #else<br /> static int __init tsc_setup(char *str)<br /> {<br />+ WARN_ON(1);<br /> printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "<br /> "cannot disable TSC.\n");<br /> return 1;<br />--- linux/arch/i386/kernel/timers/common.c.orig<br />+++ linux/arch/i386/kernel/timers/common.c<br />&#64;&#64; -39,8 +39,10 &#64;&#64; unsigned long __init calibrate_tsc(void)<br /> <br /> <br /> /* Error: ECTCNEVERSET */<br />- if (count &lt;= 1)<br />+ if (count &lt;= 1) {<br />+ WARN_ON(1);<br /> goto bad_ctc;<br />+ }<br /> <br /> /* 64-bit subtract - gcc just messes up with long longs */<br /> __asm__("subl %2,%0\n\t"<br />&#64;&#64; -50,12 +52,16 &#64;&#64; unsigned long __init calibrate_tsc(void)<br /> "0" (endlow), "1" (endhigh));<br /> <br /> /* Error: ECPUTOOFAST */<br />- if (endhigh)<br />+ if (endhigh) {<br />+ WARN_ON(1);<br /> goto bad_ctc;<br />+ }<br /> <br /> /* Error: ECPUTOOSLOW */<br />- if (endlow &lt;= CALIBRATE_TIME)<br />+ if (endlow &lt;= CALIBRATE_TIME) {<br />+ WARN_ON(1);<br /> goto bad_ctc;<br />+ }<br /> <br /> __asm__("divl %2"<br /> :"=a" (endlow), "=d" (endhigh)<br />&#64;&#64; -107,12 +113,16 &#64;&#64; unsigned long __init calibrate_tsc_hpet(<br /> "0" (tsc_endlow), "1" (tsc_endhigh));<br /> <br /> /* Error: ECPUTOOFAST */<br />- if (tsc_endhigh)<br />+ if (tsc_endhigh) {<br />+ WARN_ON(1);<br /> goto bad_calibration;<br />+ }<br /> <br /> /* Error: ECPUTOOSLOW */<br />- if (tsc_endlow &lt;= CALIBRATE_TIME_HPET)<br />+ if (tsc_endlow &lt;= CALIBRATE_TIME_HPET) {<br />+ WARN_ON(1);<br /> goto bad_calibration;<br />+ }<br /> <br /> ASM_DIV64_REG(result, remain, tsc_endlow, 0, CALIBRATE_TIME_HPET);<br /> if (remain &gt; (tsc_endlow &gt;&gt; 1))<br />-<br />To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br />the body of a message to majordomo&#64;vger.kernel.org<br />More majordomo info at <a href="http://vger.kernel.org/majordomo-info.html">http://vger.kernel.org/majordomo-info.html</a><br />Please read the FAQ at <a href="http://www.tux.org/lkml/">http://www.tux.org/lkml/</a><br /></pre></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerr.gif" width="32" height="32" alt="\" /></td></tr><tr><td align="right" valign="bottom"> 聽 </td></tr><tr><td align="right" valign="bottom">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerl.gif" width="32" height="32" alt="\" /></td><td class="c">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerr.gif" width="32" height="32" alt="/" /></td></tr><tr><td align="right" valign="top" colspan="2"> 聽 </td><td class="lm">Last update: 2005-04-06 13:31 聽聽 [from the cache]<br />漏2003-2020 <a href="http://blog.jasper.es/"><span itemprop="editor">Jasper Spaans</span></a>|hosted at <a href="https://www.digitalocean.com/?refcode=9a8e99d24cf9">Digital Ocean</a> and my Meterkast|<a href="http://blog.jasper.es/categories.html#lkml-ref">Read the blog</a></td><td>聽</td></tr></table><script language="javascript" src="/js/styleswitcher.js" type="text/javascript"></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10