mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] softlockup, sched: convert softlockup to real-time timestamping
@ 2011-12-21 21:17 Don Zickus
  2011-12-21 21:17 ` [PATCH 1/5] sched: Minimize the number of touch_softlockup_watchdogs Don Zickus
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Don Zickus @ 2011-12-21 21:17 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, avi, Andrew Morton, tglx, Don Zickus

Currently, the touch_softlockup_watchdog code just delays the setting of the
timestamp until the timer thread is run.  This causes the softlockup timer
to be unarmed for a brief period until the timer runs and re-arms the
watchdog.

It seems some workloads are affected by this, namely Anton's test code
that disables interrupts and idles the cpu on ppc.  By switching to a
model where we timestamp as soon as we are called in
touch_softlockup_watchdog(), we can trigger a little sooner and in
more cases.

The flip side, is there is some extra overhead to calculating the 
time at the touch.  Normally this shouldn't be an issue, because most
cases, any code touching the watchdog already believes it is in a
slow path.  This is not true for the scheduler.

The scheduler at any time can take large jumps of time (ie suspend/resume,
kgdb, virt guest pause/restart) and therefore needs to touch the watchdog
to prevent from falsely firing at almost every tick.

I noticed that the touch_softlockup_watchdog was being called very
frequently in the scheduler.  So the first two patches are an attempt
to minimize them from being called a million times/sec to zero under
normal circumstances.

The last patch removes a long standing hack that should be satisified
with the new changes (untested though).

I tested these patches through suspend/resume, a kvm guest and using
lkdtm (softlockup).  Everything seems to work as it did before.

Anton Blanchard (2):
  watchdog: Remove touch_all_softlockup_watchdogs
  watchdog: Softlockup has regular windows where it is not armed

Don Zickus (3):
  sched: Minimize the number of touch_softlockup_watchdogs
  time: Minimize number of touch_softlockup_watchdog
  kgdb, softlockup:  Remove touch_softlockup_watchdog_sync

 include/linux/sched.h     |    8 --------
 kernel/debug/debug_core.c |    2 +-
 kernel/sched/clock.c      |    3 ++-
 kernel/sched/core.c       |    2 +-
 kernel/time/tick-sched.c  |    7 ++-----
 kernel/watchdog.c         |   37 ++-----------------------------------
 6 files changed, 8 insertions(+), 51 deletions(-)

-- 
1.7.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-21 21:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 21:17 [PATCH 0/5] softlockup, sched: convert softlockup to real-time timestamping Don Zickus
2011-12-21 21:17 ` [PATCH 1/5] sched: Minimize the number of touch_softlockup_watchdogs Don Zickus
2011-12-21 21:17 ` [PATCH 2/5] time: Minimize number of touch_softlockup_watchdog Don Zickus
2011-12-21 21:17 ` [PATCH 3/5] watchdog: Remove touch_all_softlockup_watchdogs Don Zickus
2011-12-21 21:17 ` [PATCH 4/5] watchdog: Softlockup has regular windows where it is not armed Don Zickus
2011-12-21 21:17 ` [PATCH 5/5] kgdb, softlockup: Remove touch_softlockup_watchdog_sync Don Zickus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®