<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time, branch v2.6.23</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.23</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.23'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2007-10-07T23:28:43Z</updated>
<entry>
<title>Fix timer_stats printout of events/sec</title>
<updated>2007-10-07T23:28:43Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2007-10-07T07:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74922be1485818ed368c4cf4f0b100f70bf01e08'/>
<id>urn:sha1:74922be1485818ed368c4cf4f0b100f70bf01e08</id>
<content type='text'>
When using /proc/timer_stats on ppc64 I noticed the events/sec field wasnt
accurate.  Sometimes the integer part was incorrect due to rounding (we
werent taking the fractional seconds into consideration).

The fraction part is also wrong, we need to pad the printf statement and
take the bottom three digits of 1000 times the value.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>clockevents: remove the suspend/resume workaround^Wthinko</title>
<updated>2007-09-23T00:15:34Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-22T22:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7e113dc9d52c4a37d2da6fafe77959f3a28eccf'/>
<id>urn:sha1:b7e113dc9d52c4a37d2da6fafe77959f3a28eccf</id>
<content type='text'>
In a desparate attempt to fix the suspend/resume problem on Andrews
VAIO I added a workaround which enforced the broadcast of the oneshot
timer on resume. This was actually resolving the problem on the VAIO
but was just a stupid workaround, which was not tackling the root
cause: the assignement of lower idle C-States in the ACPI processor_idle
code. The cpuidle patches, which utilize the dynamic tick feature and
go faster into deeper C-states exposed the problem again. The correct
solution is the previous patch, which prevents lower C-states across
the suspend/resume.

Remove the enforcement code, including the conditional broadcast timer
arming, which helped to pamper over the real problem for quite a time.
The oneshot broadcast flag for the cpu, which runs the resume code can
never be set at the time when this code is executed. It only gets set,
when the CPU is entering a lower idle C-State.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>clockevents: prevent stale tick update on offline cpu</title>
<updated>2007-09-16T13:36:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-16T13:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e41d0d60a534d2a5dc9772600a58f44c8d12506'/>
<id>urn:sha1:5e41d0d60a534d2a5dc9772600a58f44c8d12506</id>
<content type='text'>
Taking a cpu offline removes the cpu from the online mask before the
CPU_DEAD notification is done. The clock events layer does the cleanup
of the dead CPU from the CPU_DEAD notifier chain. tick_do_timer_cpu is
used to avoid xtime lock contention by assigning the task of jiffies
xtime updates to one CPU. If a CPU is taken offline, then this
assignment becomes stale. This went unnoticed because most of the time
the offline CPU went dead before the online CPU reached __cpu_die(),
where the CPU_DEAD state is checked. In the case that the offline CPU did
not reach the DEAD state before we reach __cpu_die(), the code in there
goes to sleep for 100ms. Due to the stale time update assignment, the
system is stuck forever.

Take the assignment away when a cpu is not longer in the cpu_online_mask.
We do this in the last call to tick_nohz_stop_sched_tick() when the offline
CPU is on the way to the final play_dead() idle entry.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>clockevents: do not shutdown the oneshot broadcast device</title>
<updated>2007-09-16T13:36:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-16T13:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31d9b3938c0459e5e9755ce0a98ac1e24eeff972'/>
<id>urn:sha1:31d9b3938c0459e5e9755ce0a98ac1e24eeff972</id>
<content type='text'>
When a cpu goes offline it is removed from the broadcast masks. If the
mask becomes empty the code shuts down the broadcast device. This is
wrong, because the broadcast device needs to be ready for the online
cpu going idle (into a c-state, which stops the local apic timer).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>clockevents: Enforce oneshot broadcast when broadcast mask is set on resume</title>
<updated>2007-09-16T13:36:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-16T13:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07eec6af448d13a6a520d9c6f06f2e87f61b567a'/>
<id>urn:sha1:07eec6af448d13a6a520d9c6f06f2e87f61b567a</id>
<content type='text'>
The jinxed VAIO refuses to resume without hitting keys on the keyboard
when this is not enforced. It is unclear why the cpu ends up in a lower
C State without notifying the clock events layer, but enforcing the
oneshot broadcast here is safe.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>timekeeping: Prevent time going backwards on resume</title>
<updated>2007-09-16T13:36:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-16T13:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a669ee8a790487b7ec1edda762d39615a78264b'/>
<id>urn:sha1:6a669ee8a790487b7ec1edda762d39615a78264b</id>
<content type='text'>
Timekeeping resume adjusts xtime by adding the slept time in seconds and
resets the reference value of the clock source (clock-&gt;cycle_last).
clock-&gt;cycle last is used to calculate the delta between the last xtime
update and the readout of the clock source in __get_nsec_offset(). xtime
plus the offset is the current time. The resume code ignores the delta
which had already elapsed between the last xtime update and the actual
time of suspend. If the suspend time is short, then we can see time
going backwards on resume.

Suspend:
offs_s = clock-&gt;read() - clock-&gt;cycle_last;
now = xtime + offs_s;
timekeeping_suspend_time = read_rtc();

Resume:
sleep_time = read_rtc() - timekeeping_suspend_time;
xtime.tv_sec += sleep_time;
clock-&gt;cycle_last = clock-&gt;read();
offs_r = clock-&gt;read() - clock-&gt;cycle_last;
now = xtime + offs_r;

if sleep_time_seconds == 0 and offs_r &lt; offs_s, then time goes
backwards.

Fix this by storing the offset from the last xtime update and add it to
xtime during resume, when we reset clock-&gt;cycle_last:

sleep_time = read_rtc() - timekeeping_suspend_time;
xtime.tv_sec += sleep_time;
xtime += offs_s;	/* Fixup xtime offset at suspend time */
clock-&gt;cycle_last = clock-&gt;read();
offs_r = clock-&gt;read() - clock-&gt;cycle_last;
now = xtime + offs_r;

Thanks to Marcelo for tracking this down on the OLPC and providing the
necessary details to analyze the root cause.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Tosatti &lt;marcelo@kvack.org&gt;

</content>
</entry>
<entry>
<title>timekeeping: access rtc outside of xtime lock</title>
<updated>2007-09-16T13:36:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-09-16T13:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3be9095063885d482b87d3875ea7f28e635882d0'/>
<id>urn:sha1:3be9095063885d482b87d3875ea7f28e635882d0</id>
<content type='text'>
Lockdep complains about the access of rtc in timekeeping_suspend
inside the interrupt disabled region of the write locked xtime lock.
Move the access outside.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;

</content>
</entry>
<entry>
<title>Fix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c</title>
<updated>2007-09-12T00:21:27Z</updated>
<author>
<name>Tony Breeds</name>
<email>tony@bakeyournoodle.com</email>
</author>
<published>2007-09-11T22:24:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=298a5df45d497e66064fda22ef0abf13766d3333'/>
<id>urn:sha1:298a5df45d497e66064fda22ef0abf13766d3333</id>
<content type='text'>
Seems to me that this timer will only get started on platforms that say
they don't want it?

Signed-off-by: Tony Breeds &lt;tony@bakeyournoodle.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Gabriel Paubert &lt;paubert@iram.es&gt;
Cc: Zachary Amsden &lt;zach@vmware.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>timer: remove clockevents_unregister_notifier</title>
<updated>2007-08-11T22:47:42Z</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2007-08-10T20:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ddfca9548d8ecc26096a30667423ba919109533'/>
<id>urn:sha1:6ddfca9548d8ecc26096a30667423ba919109533</id>
<content type='text'>
I find a function(clockevents_unregister_notifier) which is not called by
anything in tree.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Fix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats}</title>
<updated>2007-07-31T22:39:40Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@sw.ru</email>
</author>
<published>2007-07-31T07:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ea473a1dfeca2ee38c5dd458c1174d129e6b64e'/>
<id>urn:sha1:5ea473a1dfeca2ee38c5dd458c1174d129e6b64e</id>
<content type='text'>
On every open/close one struct seq_operations leaks.
Kudos to /proc/slab_allocators.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@sw.ru&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
