<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/hrtimer.c, branch mybooklive</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/hrtimer.c?h=mybooklive</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/hrtimer.c?h=mybooklive'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-04-01T22:58:14Z</updated>
<entry>
<title>hrtimer: Tune hrtimer_interrupt hang logic</title>
<updated>2010-04-01T22:58:14Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2009-11-13T16:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2605c157ed3bb18e66a6a08263448046f77ba5fb'/>
<id>urn:sha1:2605c157ed3bb18e66a6a08263448046f77ba5fb</id>
<content type='text'>
commit 41d2e494937715d3150e5c75d01f0e75ae899337 upstream.

The hrtimer_interrupt hang logic adjusts min_delta_ns based on the
execution time of the hrtimer callbacks.

This is error-prone for virtual machines, where a guest vcpu can be
scheduled out during the execution of the callbacks (and the callbacks
themselves can do operations that translate to blocking operations in
the hypervisor), which in can lead to large min_delta_ns rendering the
system unusable.

Replace the current heuristics with something more reliable. Allow the
interrupt code to try 3 times to catch up with the lost time. If that
fails use the total time spent in the interrupt handler to defer the
next timer interrupt so the system can catch up with other things
which got delayed. Limit that deferment to 100ms.

The retry events and the maximum time spent in the interrupt handler
are recorded and exposed via /proc/timer_list

Inspired by a patch from Marcelo.

Reported-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: kvm@vger.kernel.org
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-10-05T19:04:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-10-05T19:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e69a9ac59629db81971a9e03048f9a107712947a'/>
<id>urn:sha1:e69a9ac59629db81971a9e03048f9a107712947a</id>
<content type='text'>
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Remove overly verbose "switch to high res mode" message
</content>
</entry>
<entry>
<title>Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-09-27T17:39:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-27T17:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f5071020d5ec89b5d095aa488db604adb921aec'/>
<id>urn:sha1:6f5071020d5ec89b5d095aa488db604adb921aec</id>
<content type='text'>
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Eliminate needless reprogramming of clock events device
</content>
</entry>
<entry>
<title>hrtimer: Remove overly verbose "switch to high res mode" message</title>
<updated>2009-09-26T14:58:09Z</updated>
<author>
<name>Roland Dreier</name>
<email>rdreier@cisco.com</email>
</author>
<published>2009-09-24T21:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3f6302e7e51b41af86c6496ffb2f95e8f2179df'/>
<id>urn:sha1:d3f6302e7e51b41af86c6496ffb2f95e8f2179df</id>
<content type='text'>
On big systems, printing &lt;number of CPUs&gt; copies of

    Switched to high resolution mode on CPU nnn

clutters up the kernel log for minimal gain.  Just get rid of them.

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
LKML-Reference: &lt;ada1vlw126s.fsf_-_@cisco.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-09-23T16:46:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-23T16:46:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397'/>
<id>urn:sha1:31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397</id>
<content type='text'>
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  itimers: Add tracepoints for itimer
  hrtimer: Add tracepoint for hrtimers
  timers: Add tracepoints for timer_list timers
  cputime: Optimize jiffies_to_cputime(1)
  itimers: Simplify arm_timer() code a bit
  itimers: Fix periodic tics precision
  itimers: Merge ITIMER_VIRT and ITIMER_PROF

Trivial header file include conflicts in kernel/fork.c
</content>
</entry>
<entry>
<title>Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-09-18T16:15:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-18T16:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a03fdb7612874834d6847107198712d18b5242c7'/>
<id>urn:sha1:a03fdb7612874834d6847107198712d18b5242c7</id>
<content type='text'>
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (34 commits)
  time: Prevent 32 bit overflow with set_normalized_timespec()
  clocksource: Delay clocksource down rating to late boot
  clocksource: clocksource_select must be called with mutex locked
  clocksource: Resolve cpu hotplug dead lock with TSC unstable, fix crash
  timers: Drop a function prototype
  clocksource: Resolve cpu hotplug dead lock with TSC unstable
  timer.c: Fix S/390 comments
  timekeeping: Fix invalid getboottime() value
  timekeeping: Fix up read_persistent_clock() breakage on sh
  timekeeping: Increase granularity of read_persistent_clock(), build fix
  time: Introduce CLOCK_REALTIME_COARSE
  x86: Do not unregister PIT clocksource on PIT oneshot setup/shutdown
  clocksource: Avoid clocksource watchdog circular locking dependency
  clocksource: Protect the watchdog rating changes with clocksource_mutex
  clocksource: Call clocksource_change_rating() outside of watchdog_lock
  timekeeping: Introduce read_boot_clock
  timekeeping: Increase granularity of read_persistent_clock()
  timekeeping: Update clocksource with stop_machine
  timekeeping: Add timekeeper read_clock helper functions
  timekeeping: Move NTP adjusted clock multiplier to struct timekeeper
  ...

Fix trivial conflict due to MIPS lemote -&gt; loongson renaming.
</content>
</entry>
<entry>
<title>hrtimer: Eliminate needless reprogramming of clock events device</title>
<updated>2009-09-15T15:09:44Z</updated>
<author>
<name>Ashwin Chaugule</name>
<email>ashwinc@quicinc.com</email>
</author>
<published>2009-09-02T03:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7403f41f19574d6805197e9b97dfa7592003be10'/>
<id>urn:sha1:7403f41f19574d6805197e9b97dfa7592003be10</id>
<content type='text'>
On NOHZ systems the following timers,

-  tick_nohz_restart_sched_tick (tick_sched_timer)
-  hrtimer_start (tick_sched_timer)

are reprogramming the clock events device far more often than needed.
No specific test case was required to observe this effect. This
occurres because there was no check to see if the currently removed or
restarted hrtimer was:

1) the one which previously armed the clock events device.
2) going to be replaced by another timer which has the same expiry time.

Avoid the reprogramming in hrtimer_force_reprogram when the new expiry
value which is evaluated from the clock bases is equal to
cpu_base-&gt;expires_next. This results in faster application startup
time by ~4%.

[ tglx: simplified initial solution ]

Signed-off-by: Ashwin Chaugule &lt;ashwinc@quicinc.com&gt;
LKML-Reference: &lt;4AA00165.90609@codeaurora.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>hrtimer: Add tracepoint for hrtimers</title>
<updated>2009-08-29T12:10:06Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@cn.fujitsu.com</email>
</author>
<published>2009-08-10T02:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c6a2a1770245f654f35f60e1458d4356680f9519'/>
<id>urn:sha1:c6a2a1770245f654f35f60e1458d4356680f9519</id>
<content type='text'>
Add tracepoints which cover the life cycle of a hrtimer. The
tracepoints are integrated with the already existing debug_object
debug points as far as possible.

[ tglx: Fixed comments, made output conistent, easier to read and
  	parse. Fixed output for 32bit archs which do not use the
  	scalar representation of ktime_t. Hand current time to
  	trace_hrtimer_expiry_entry instead of calling get_time()
  	inside of the trace assignment. ]

Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@cn.fujitsu.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Zhaolei &lt;zhaolei@cn.fujitsu.com&gt;
LKML-Reference: &lt;4A7F8B2B.5020908@cn.fujitsu.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>pktgen: spin using hrtimer</title>
<updated>2009-08-29T06:41:29Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2009-08-29T06:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2bc481cf433879f0e6cdd4d899fc21ee05dcea23'/>
<id>urn:sha1:2bc481cf433879f0e6cdd4d899fc21ee05dcea23</id>
<content type='text'>
This changes how the pktgen thread spins/waits between
packets if delay is configured. It uses a high res timer to
wait for time to arrive.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' into timers/core</title>
<updated>2009-08-14T13:59:30Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2009-08-14T13:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4cd1993f0046fbc765dbf20af90966f5661e3789'/>
<id>urn:sha1:4cd1993f0046fbc765dbf20af90966f5661e3789</id>
<content type='text'>
Reason: Martin's timekeeping cleanup series depends on both
timers/core and mainline changes.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
