From: Don Zickus <dzickus@redhat.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
avi@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
tglx@linutronix.de, Don Zickus <dzickus@redhat.com>
Subject: [PATCH 0/5] softlockup, sched: convert softlockup to real-time timestamping
Date: Wed, 21 Dec 2011 16:17:40 -0500 [thread overview]
Message-ID: <1324502265-24521-1-git-send-email-dzickus@redhat.com> (raw)
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
next reply other threads:[~2011-12-21 21:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 21:17 Don Zickus [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324502265-24521-1-git-send-email-dzickus@redhat.com \
--to=dzickus@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®