<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=RTC_No_Sync&amp;feed=atom&amp;action=history</id>
		<title>RTC No Sync - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;action=history"/>
		<updated>2013-05-21T03:05:25Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=7945&amp;oldid=prev</id>
		<title>FransMeulenbroeks at 12:41, 16 November 2008</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=7945&amp;oldid=prev"/>
				<updated>2008-11-16T12:41:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:41, 16 November 2008&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Boot Time]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Boot Time]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;RTC No Sync&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Kernel&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:4726:newid:7945 --&gt;
&lt;/table&gt;</summary>
		<author><name>FransMeulenbroeks</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=4726&amp;oldid=prev</id>
		<title>Tim Bird: /* Status */ add mainline status</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=4726&amp;oldid=prev"/>
				<updated>2007-10-12T19:06:14Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Status: &lt;/span&gt; add mainline status&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:06, 12 October 2007&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Status ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Status ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Fixed in mainline.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Matt Mackall submitted a large patch set to fix this problem, in March 2006.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;See http://lkml.org/lkml/2006/3/17/340 .&amp;#160; These patches were mainlined&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in the Linux kernel in version 2.6.16.&amp;#160; See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63732c2f37093d63102d53e70866cf87bf0c0479&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;=== Previous mainline attempts ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A patch was eventually submitted to LKML for consideration (in Nov, 2004).&amp;#160; The thread is [http://groups.google.com/groups?q==rtc+griffiths&amp;amp;hl==en&amp;amp;lr==&amp;amp;selm==2UNgm-6Mu-21%40gated-at.bofh.it&amp;amp;rnum==1 here]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A patch was eventually submitted to LKML for consideration (in Nov, 2004).&amp;#160; The thread is [http://groups.google.com/groups?q==rtc+griffiths&amp;amp;hl==en&amp;amp;lr==&amp;amp;selm==2UNgm-6Mu-21%40gated-at.bofh.it&amp;amp;rnum==1 here]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:4725:newid:4726 --&gt;
&lt;/table&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=4725&amp;oldid=prev</id>
		<title>Tim Bird: /* Introduction */ fix MoinMoin formatting</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=4725&amp;oldid=prev"/>
				<updated>2007-10-12T18:42:05Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction: &lt;/span&gt; fix MoinMoin formatting&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:42, 12 October 2007&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;One routine that potentially takes a long time during kernel startup is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{{&lt;/del&gt;get_cmos_time()&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}}&lt;/del&gt;.&amp;#160; This routine is used to read the value of the external real-time clock (RTC) when the kernel boots. Currently, this routine delays until the edge of the next second rollover, in order to ensure that the time value in the kernel is accurate with respect to the RTC.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;One routine that potentially takes a long time during kernel startup is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;get_cmos_time()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;.&amp;#160; This routine is used to read the value of the external real-time clock (RTC) when the kernel boots. Currently, this routine delays until the edge of the next second rollover, in order to ensure that the time value in the kernel is accurate with respect to the RTC.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;However, this operation can take up to one full second to complete, and thus introduces up to 1 second of variability in the total bootup time. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;However, this operation can take up to one full second to complete, and thus introduces up to 1 second of variability in the total bootup time. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The synchronization in this routine is easy to remove. It can be eliminated by removing the first two loops in the function &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{{&lt;/del&gt;get_cmos_time()&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}}&lt;/del&gt;, which is located in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{{&lt;/del&gt;include/asm-i386/mach-default/mach_time.h&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}} &lt;/del&gt;for the i386 architecture.&amp;#160; Similar routines are present in the kernel source tree for other architectures.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The synchronization in this routine is easy to remove. It can be eliminated by removing the first two loops in the function &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;get_cmos_time()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;, which is located in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;include/asm-i386/mach-default/mach_time.h&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt; &lt;/ins&gt;for the i386 architecture.&amp;#160; Similar routines are present in the kernel source tree for other architectures.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;One tradeoff in making this modification is that the time stored by the Linux kernel is no longer completely synchronized (to the boundary of a second) with the time in the machine's realtime clock hardware. Some systems save the system time back out to the hardware clock on system shutdown.&amp;#160; After numerous bootups and shutdowns, this lack of synchronization will cause the realtime clock value to drift from the correct time value.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;One tradeoff in making this modification is that the time stored by the Linux kernel is no longer completely synchronized (to the boundary of a second) with the time in the machine's realtime clock hardware. Some systems save the system time back out to the hardware clock on system shutdown.&amp;#160; After numerous bootups and shutdowns, this lack of synchronization will cause the realtime clock value to drift from the correct time value.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:1583:newid:4725 --&gt;
&lt;/table&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=1583&amp;oldid=prev</id>
		<title>Wmat: Legacy Content Conversion</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=RTC_No_Sync&amp;diff=1583&amp;oldid=prev"/>
				<updated>2006-12-06T14:54:20Z</updated>
		
		<summary type="html">&lt;p&gt;Legacy Content Conversion&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One routine that potentially takes a long time during kernel startup is {{{get_cmos_time()}}}.  This routine is used to read the value of the external real-time clock (RTC) when the kernel boots. Currently, this routine delays until the edge of the next second rollover, in order to ensure that the time value in the kernel is accurate with respect to the RTC.&lt;br /&gt;
&lt;br /&gt;
However, this operation can take up to one full second to complete, and thus introduces up to 1 second of variability in the total bootup time. &lt;br /&gt;
&lt;br /&gt;
The synchronization in this routine is easy to remove. It can be eliminated by removing the first two loops in the function {{{get_cmos_time()}}}, which is located in {{{include/asm-i386/mach-default/mach_time.h}}} for the i386 architecture.  Similar routines are present in the kernel source tree for other architectures.&lt;br /&gt;
&lt;br /&gt;
One tradeoff in making this modification is that the time stored by the Linux kernel is no longer completely synchronized (to the boundary of a second) with the time in the machine's realtime clock hardware. Some systems save the system time back out to the hardware clock on system shutdown.  After numerous bootups and shutdowns, this lack of synchronization will cause the realtime clock value to drift from the correct time value.&lt;br /&gt;
&lt;br /&gt;
Since the amount of un-synchronization is up to a second per boot cycle, this drift can be significant.  However, for some embedded applications, this drift is unimportant.  Also, in some situations the system time may be synchronized with an external source anyway, so the drift, if any, is corrected under normal circumstances soon after booting.&lt;br /&gt;
&lt;br /&gt;
=== LKML discussion ===&lt;br /&gt;
The RTC synchronization was discussed on LKML in May (with even Linus himself commenting) That thread is available &lt;br /&gt;
[http://groups.google.com/groups?hl==en&amp;amp;lr==&amp;amp;ie==UTF-8&amp;amp;threadm==1To2R-2S7-11%40gated-at.bofh.it&amp;amp;rnum==1&amp;amp;prev==/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3D1To2R-2S7-11%40gated-at.bofh.it here].&lt;br /&gt;
&lt;br /&gt;
=== Rationale ===&lt;br /&gt;
The RTC edge synchronization can take up to 1 second, and takes .5 seconds on average.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
=== Patch ===&lt;br /&gt;
*[Patch for CELF version XXXXXX is *here*]&lt;br /&gt;
*[Patch for 2.4.xx is *here*]&lt;br /&gt;
*Patch for 2.6.7 (only for i386 architecture): rtc-nosynch-3.patch&lt;br /&gt;
*Patch for 2.6.10 for PPC architecture: attachment:rtcnosync-ppc-2.6.10.patch&lt;br /&gt;
&lt;br /&gt;
You might also want to check the [[Patch Archive]]&lt;br /&gt;
&lt;br /&gt;
=== Utility programs ===&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
== How To Use ==&lt;br /&gt;
Apply the patch to your Linux kernel.  Then reconfigure your kernel so that &amp;quot;CONFIG_RTC_NO_SYNC_ON_READ&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
The option will be found under &amp;quot;General Setup&amp;quot;, &amp;quot;Fast boot options&amp;quot; labeled as &amp;quot;No SYNC on read of Real Time Clock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Sample Results ==&lt;br /&gt;
=== case 1 ===&lt;br /&gt;
Tim Bird measured the effect of eliminating this synchronization on an HP xw4100 workstation.  The machine had a Pentium 4 processor running at 3 GHz. With the synchronization, the time to perform get_cmos_time() varied from 150 milliseconds to 900 milliseconds.  Without the synchronization, the time to perform get_cmos_time() was under 1 millisecond.&lt;br /&gt;
&lt;br /&gt;
=== case 2 ===&lt;br /&gt;
Richard Griffiths measured the effect of eliminating the synchronization on a 1GHZ Pentium III based desktop. With synchronization executing get_cmos_time() took from 200 milliseconds to a full second. Without the synchronization, the time to perform get_cmos_time() was under 1 millisecond.&lt;br /&gt;
&lt;br /&gt;
=== case 3 ===&lt;br /&gt;
Tim Bird measured the RTC read synchronization cost for a PowerPC board. The platform was a PPC440GP (ebony) board, using a Dallas Semiconductor DS1743 RTC.&lt;br /&gt;
&lt;br /&gt;
The RTC read routine is in arch/ppc/syslib/todc_time.c:todc_get_rtc_time(). The loop to synchronize with the seconds edge is in arch/ppc/kernel/time.h:time_init().&lt;br /&gt;
&lt;br /&gt;
I measured the time for synchronizing the clock edge several times:&lt;br /&gt;
*105 ms, 139 ms, 313 ms, 572 ms, 213 ms, 626 ms, 753 ms, 426 ms, 535 ms, 163 ms&lt;br /&gt;
&lt;br /&gt;
Note that for PPC, the synchronization code is ''outside'' the RTC read routine, instead of inside the routine (as for i386).&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
A patch was eventually submitted to LKML for consideration (in Nov, 2004).  The thread is [http://groups.google.com/groups?q==rtc+griffiths&amp;amp;hl==en&amp;amp;lr==&amp;amp;selm==2UNgm-6Mu-21%40gated-at.bofh.it&amp;amp;rnum==1 here]&lt;br /&gt;
&lt;br /&gt;
There was no response.&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
Here is a list of things that could be worked on for this feature:&lt;br /&gt;
*In an earlier thread on LKML, it was suggested that some background method of synchronizing the system clock and hardware clock could be used to avoid the clock drift problem.&lt;br /&gt;
*one idea is: &amp;quot;you could check the cmos time in the timer interrupt during boot, and correct it there rather than busy-waiting&amp;quot;&lt;br /&gt;
*Another person notes:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;There is hwclock that will read or write the CMOS clock, and it synchronizes. So if one wants to synchronize with the CMOS clock (rather than, say, with an external clock), and wants the better-than-1-sec accuracy,     then that can be done in a boot script.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*We need to check if hwclock uses get_cmos_time() to read the clock.  If so, this method of synchronizing the clock edge after booting won't work (once the get_cmos_time synch is disabled.)&lt;br /&gt;
&lt;br /&gt;
[[Category:Boot Time]]&lt;br /&gt;
[[Category:RTC No Sync]]&lt;/div&gt;</summary>
		<author><name>Wmat</name></author>	</entry>

	</feed>