<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/watchdog.c, branch v5.7</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=v5.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-01-17T10:19:22Z</updated>
<entry>
<title>watchdog/softlockup: Enforce that timestamp is valid on boot</title>
<updated>2020-01-17T10:19:22Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-01-16T18:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11e31f608b499f044f24b20be73f1dcab3e43f8a'/>
<id>urn:sha1:11e31f608b499f044f24b20be73f1dcab3e43f8a</id>
<content type='text'>
Robert reported that during boot the watchdog timestamp is set to 0 for one
second which is the indicator for a watchdog reset.

The reason for this is that the timestamp is in seconds and the time is
taken from sched clock and divided by ~1e9. sched clock starts at 0 which
means that for the first second during boot the watchdog timestamp is 0,
i.e. reset.

Use ULONG_MAX as the reset indicator value so the watchdog works correctly
right from the start. ULONG_MAX would only conflict with a real timestamp
if the system reaches an uptime of 136 years on 32bit and almost eternity
on 64bit.

Reported-by: Robert Richter &lt;rrichter@marvell.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/87o8v3uuzl.fsf@nanos.tec.linutronix.de

</content>
</entry>
<entry>
<title>watchdog/softlockup: Remove obsolete check of last reported task</title>
<updated>2020-01-16T13:52:48Z</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2019-10-24T11:49:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a51449b7959f68cc45abe67298e40c7eb57167b'/>
<id>urn:sha1:3a51449b7959f68cc45abe67298e40c7eb57167b</id>
<content type='text'>
commit 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads
 with cpu_stop_work") ensures that the watchdog is reliably touched during
a task switch.

As a result the check for an unnoticed task switch is not longer needed.

Remove the relevant code, which effectively reverts commit b1a8de1f5343
("softlockup: make detector be aware of task switch of processes hogging
cpu")

Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Ziljstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20191024114928.15377-2-pmladek@suse.com
</content>
</entry>
<entry>
<title>watchdog: Remove soft_lockup_hrtimer_cnt and related code</title>
<updated>2020-01-16T11:25:51Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>Jisheng.Zhang@synaptics.com</email>
</author>
<published>2019-12-18T05:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d129479f1fff5c88adbf8dff7649664916d28f81'/>
<id>urn:sha1:d129479f1fff5c88adbf8dff7649664916d28f81</id>
<content type='text'>
After commit 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u"
threads with cpu_stop_work"), the percpu soft_lockup_hrtimer_cnt is
not used any more, so remove it and related code.

Signed-off-by: Jisheng Zhang &lt;Jisheng.Zhang@synaptics.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20191218131720.4146aea2@xhacker.debian

</content>
</entry>
<entry>
<title>watchdog: Mark watchdog_hrtimer to expire in hard interrupt context</title>
<updated>2019-08-01T18:51:20Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2019-07-26T18:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2ab4cf4943576fb060b8a69341d9e0c2a952ba7'/>
<id>urn:sha1:d2ab4cf4943576fb060b8a69341d9e0c2a952ba7</id>
<content type='text'>
The watchdog hrtimer must expire in hard interrupt context even on
PREEMPT_RT=y kernels as otherwise the hard/softlockup detection logic would
not work.

No functional change.

[ tglx: Split out from larger combo patch. Added changelog ]

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20190726185753.262895510@linutronix.de



</content>
</entry>
<entry>
<title>watchdog: Fix typo in comment</title>
<updated>2019-04-18T12:05:51Z</updated>
<author>
<name>Arash Fotouhi</name>
<email>arash@arashfotouhi.com</email>
</author>
<published>2019-03-23T02:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76e1552466ff2da8b909df0fff3600ec1c27edcc'/>
<id>urn:sha1:76e1552466ff2da8b909df0fff3600ec1c27edcc</id>
<content type='text'>
Signed-off-by: Arash Fotouhi &lt;arash@arashfotouhi.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: loberman@redhat.com
Cc: vincent.whitchurch@axis.com
Link: http://lkml.kernel.org/r/1553308112-3513-1-git-send-email-arash@arashfotouhi.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog: Respect watchdog cpumask on CPU hotplug</title>
<updated>2019-03-28T12:32:01Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-03-26T21:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7dd47617114921fdd8c095509e5e7b4373cc44a1'/>
<id>urn:sha1:7dd47617114921fdd8c095509e5e7b4373cc44a1</id>
<content type='text'>
The rework of the watchdog core to use cpu_stop_work broke the watchdog
cpumask on CPU hotplug.

The watchdog_enable/disable() functions are now called unconditionally from
the hotplug callback, i.e. even on CPUs which are not in the watchdog
cpumask. As a consequence the watchdog can become unstoppable.

Only invoke them when the plugged CPU is in the watchdog cpumask.

Fixes: 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work")
Reported-by: Maxime Coquelin &lt;maxime.coquelin@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Maxime Coquelin &lt;maxime.coquelin@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1903262245490.1789@nanos.tec.linutronix.de

</content>
</entry>
<entry>
<title>watchdog/core: Make variables static</title>
<updated>2019-03-22T12:40:17Z</updated>
<author>
<name>Valdis Kletnieks</name>
<email>valdis.kletnieks@vt.edu</email>
</author>
<published>2019-03-12T09:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48084abf212052ca1d39fae064c581b1ce5b1fdf'/>
<id>urn:sha1:48084abf212052ca1d39fae064c581b1ce5b1fdf</id>
<content type='text'>
sparse complains:
  CHECK   kernel/watchdog.c
kernel/watchdog.c:45:19: warning: symbol 'nmi_watchdog_available'
			 	  was not declared. Should it be static?
kernel/watchdog.c:47:16: warning: symbol 'watchdog_allowed_mask'
			 	  was not declared. Should it be static?

They're not referenced by name from anyplace else, make them static.

Signed-off-by: Valdis Kletnieks &lt;valdis.kletnieks@vt.edu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lkml.kernel.org/r/7855.1552383228@turing-police


</content>
</entry>
<entry>
<title>watchdog/core: Add watchdog_thresh command line parameter</title>
<updated>2018-11-01T13:33:35Z</updated>
<author>
<name>Laurence Oberman</name>
<email>loberman@redhat.com</email>
</author>
<published>2018-11-01T13:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11295055526308ee71d82dc97f0a9ca2dd61c3b9'/>
<id>urn:sha1:11295055526308ee71d82dc97f0a9ca2dd61c3b9</id>
<content type='text'>
The hard and soft lockup detector threshold has a default value of 10
seconds which can only be changed via sysctl.

During early boot lockup detection can trigger when noisy debugging emits
a large amount of messages to the console, but there is no way to set a
larger threshold on the kernel command line. The detector can only be
completely disabled.

Add a new watchdog_thresh= command line parameter to allow boot time
control over the threshold. It works in the same way as the sysctl and
affects both the soft and the hard lockup detectors.

Signed-off-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: rdunlap@infradead.org
Cc: prarit@redhat.com
Link: https://lkml.kernel.org/r/1541079018-13953-1-git-send-email-loberman@redhat.com


</content>
</entry>
<entry>
<title>watchdog: Mark watchdog touch functions as notrace</title>
<updated>2018-08-30T10:56:40Z</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2018-08-21T15:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb9d7fd51d9fbb329d182423bd7b92d0f8cb0e01'/>
<id>urn:sha1:cb9d7fd51d9fbb329d182423bd7b92d0f8cb0e01</id>
<content type='text'>
Some architectures need to use stop_machine() to patch functions for
ftrace, and the assumption is that the stopped CPUs do not make function
calls to traceable functions when they are in the stopped state.

Commit ce4f06dcbb5d ("stop_machine: Touch_nmi_watchdog() after
MULTI_STOP_PREPARE") added calls to the watchdog touch functions from
the stopped CPUs and those functions lack notrace annotations.  This
leads to crashes when enabling/disabling ftrace on ARM kernels built
with the Thumb-2 instruction set.

Fix it by adding the necessary notrace annotations.

Fixes: ce4f06dcbb5d ("stop_machine: Touch_nmi_watchdog() after MULTI_STOP_PREPARE")
Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: oleg@redhat.com
Cc: tj@kernel.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180821152507.18313-1-vincent.whitchurch@axis.com

</content>
</entry>
<entry>
<title>watchdog/softlockup: Fix cpu_stop_queue_work() double-queue bug</title>
<updated>2018-07-15T21:51:19Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2018-07-13T10:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be45bf5395e0886a93fc816bbe41a008ec2e42e2'/>
<id>urn:sha1:be45bf5395e0886a93fc816bbe41a008ec2e42e2</id>
<content type='text'>
When scheduling is delayed for longer than the softlockup interrupt
period it is possible to double-queue the cpu_stop_work, causing list
corruption.

Cure this by adding a completion to track the cpu_stop_work's
progress.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Tested-by: Rong Chen &lt;rong.a.chen@intel.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Fixes: 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work")
Link: http://lkml.kernel.org/r/20180713104208.GW2494@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
