login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
21
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchdog to touch_watchdog
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Frederic Weisbecker
Subject:
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchdog to touch_watchdog
Date: Wednesday, April 21, 2010 - 2:46 pm
On Wed, Apr 21, 2010 at 05:31:42PM -0400, Don Zickus wrote:
quoted text
> On Wed, Apr 21, 2010 at 10:46:01PM +0200, Frederic Weisbecker wrote: > > On Tue, Apr 20, 2010 at 11:23:59AM -0400, Don Zickus wrote: > > > Just a scripted conversion to remove touch_softlockup_watchdog. > > > > > > Also converts the once case of touch_all_softlockup_watchdogs to > > > touch_all_watchdogs. > > > > > > This is done as part of the removal of the old softlockup code and > > > transition to the new softlockup code. > > > > > > Signed-off-by: Don Zickus <dzickus@redhat.com> > > > > > > In fact I worry a bit about this unification of watchdog touching. > > When we touch the softlockup watchdog, do we also want to touch > > the nmi watchdog? > > > > Most of the time, I think we don't want to. We usually touch the > > softlockup detector because we know we are abnormally delaying > > the softlockup kthread from being scheduled, and if we are in such > > situation, it means we are doing something in a sensitive context: > > typically the kind of context favorable to create hardlockups... > > > > But the opposite is right: if we touch the nmi watchdog: it means we > > are abnormally delaying irqs, which means we also are abnormally > > delaying the softlockup kthread from being scheduled, so if we > > touch the nmi watchdog, we also want to touch the softlockup > > detector. > > > > Hence I guess we want to keep the current state: > > > > - touch_nmi_watchdog() = touch softlockup and nmi watchdogs > > - touch_softlockup_watchdog() = only touch softlockup watchdog > > Hmm ok I see what you are saying. A little tweak and I have this > compiled-tested only patch that I think satisifies you. > > I didn't really touch the touch_nmi_watchdog() code in the kernel, so it > still calls a stub function in kernel/watchdog.c. Add a boolean to that > path and I think it accomplishes the logic you are looking for. > > Cheers, > Don
Yeah looks good. Could you send this patch with a changelog and your sign-off? Thanks!
quoted text
> > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c > index 9898c7c..c1a89ac 100644 > --- a/kernel/watchdog.c > +++ b/kernel/watchdog.c > @@ -31,6 +31,7 @@ int watchdog_enabled; > int __read_mostly softlockup_thresh = 60; > > static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); > +static DEFINE_PER_CPU(bool, watchdog_nmi_touch); > static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); > static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer); > static DEFINE_PER_CPU(bool, watchdog_touch_sync); > @@ -147,6 +148,7 @@ void touch_watchdog_sync(void) > > void touch_nmi_watchdog(void) > { > + __get_cpu_var(watchdog_nmi_touch) = true; > touch_watchdog(); > } > EXPORT_SYMBOL(touch_nmi_watchdog); > @@ -203,11 +205,10 @@ void watchdog_overflow_callback(struct perf_event *event, int nmi, > struct pt_regs *regs) > { > int this_cpu = smp_processor_id(); > - unsigned long touch_ts = per_cpu(watchdog_touch_ts, this_cpu); > char warn = per_cpu(watchdog_warn, this_cpu); > > - if (touch_ts == 0) { > - __touch_watchdog(); > + if (__get_cpu_var(watchdog_nmi_touch) == true) { > + __get_cpu_var(watchdog_nmi_touch) = false; > return; > } >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 2/6] [watchdog] convert touch_softlockup_watchdog t ...
, Don Zickus
, (Tue Apr 20, 8:23 am)
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchd ...
, Frederic Weisbecker
, (Wed Apr 21, 1:46 pm)
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchd ...
, Don Zickus
, (Wed Apr 21, 2:31 pm)
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchd ...
, Frederic Weisbecker
, (Wed Apr 21, 2:46 pm)
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchd ...
, Don Zickus
, (Thu Apr 22, 6:20 am)
Re: [PATCH 2/6] [watchdog] convert touch_softlockup_watchd ...
, Frederic Weisbecker
, (Thu Apr 22, 11:53 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Frederic Weisbecker
[PATCH v2] struct sort_entry has a callback named snprintf that turns an entry int...
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Jens Axboe
Re: [BUG] Linux 2.6.25-rc2 - Regression from 2.6.24-rc1-git1 softlockup while bo...
Yinghai Lu
Re: [PATCH -v3 1/2] x86, setup: reorgize the early_console_setup
Heiko Carstens
[PATCH] net: fix xfrm build - missing scatterlist.h include
git
:
Junio C Hamano
Re: git-svnimport
Michal Sojka
[PATCHv5 1/2] filter-branch: Fix to allow replacing submodules with another content
Junio C Hamano
Re: Fwd: git status options feature suggestion
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
git-commits-head
:
Linux Kernel Mailing List
ARM: S3C64XX: DMA: Callback with correct buffer pointer
Linux Kernel Mailing List
sata_mv: drop unncessary EH callback resetting
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
Linux Kernel Mailing List
libata: disable ATAPI AN by default
openbsd-misc
:
Rene Maroufi
smtpd: Aliases only work with for local alias aliases
Stephen J. Bevan
GRE over IPsec
Christophe Rioux
Implementation example of snmp
Darrin Chandler
Re: strange output on openbsd C code
Nick Holland
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate