All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, peterz@infradead.org, pmladek@suse.com
Subject: [folded-merged] watchdog-fix-barriers-when-printing-backtraces-from-all-cpus-fix.patch removed from -mm tree
Date: Thu, 29 Apr 2021 22:20:50 -0700	[thread overview]
Message-ID: <20210430052050.bcj_hb0CI%akpm@linux-foundation.org> (raw)


The patch titled
     Subject: watchdog: use bit lock operations to prevent multiple soft-lockup reports
has been removed from the -mm tree.  Its filename was
     watchdog-fix-barriers-when-printing-backtraces-from-all-cpus-fix.patch

This patch was dropped because it was folded into watchdog-fix-barriers-when-printing-backtraces-from-all-cpus.patch

------------------------------------------------------
From: Petr Mladek <pmladek@suse.com>
Subject: watchdog: use bit lock operations to prevent multiple soft-lockup reports

Use bit_lock operation to prevent multiple soft-lockups reports when one
CPU already triggered dumping backtraces from all CPUs.

It allows to remove the explicit memory barriers and misleading
comments.

Link: https://lkml.kernel.org/r/YFSVsLGVWMXTvlbk@alley
Signed-off-by: Petr Mladek <pmladek@suse.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/watchdog.c |   15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

--- a/kernel/watchdog.c~watchdog-fix-barriers-when-printing-backtraces-from-all-cpus-fix
+++ a/kernel/watchdog.c
@@ -415,13 +415,8 @@ static enum hrtimer_restart watchdog_tim
 		 * engaged in dumping all cpu back traces.
 		 */
 		if (softlockup_all_cpu_backtrace) {
-			if (test_and_set_bit(0, &soft_lockup_nmi_warn))
+			if (test_and_set_bit_lock(0, &soft_lockup_nmi_warn))
 				return HRTIMER_RESTART;
-			/*
-			 * Make sure that reports are serialized. Start
-			 * printing after getting the exclusive rights.
-			 */
-			smp_mb__after_atomic();
 		}
 
 		/* Start period for the next softlockup warning. */
@@ -439,13 +434,7 @@ static enum hrtimer_restart watchdog_tim
 
 		if (softlockup_all_cpu_backtrace) {
 			trigger_allbutself_cpu_backtrace();
-			/*
-			 * Make sure that everything is printed before
-			 * another CPU is allowed to report lockup again.
-			 */
-			smp_mb__before_atomic();
-			/* Allow a further report. */
-			clear_bit(0, &soft_lockup_nmi_warn);
+			clear_bit_unlock(0, &soft_lockup_nmi_warn);
 		}
 
 		add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
_

Patches currently in -mm which might be from pmladek@suse.com are

watchdog-rename-__touch_watchdog-to-a-better-descriptive-name.patch
watchdog-explicitly-update-timestamp-when-reporting-softlockup.patch
watchdog-softlockup-report-the-overall-time-of-softlockups.patch
watchdog-softlockup-remove-logic-that-tried-to-prevent-repeated-reports.patch
watchdog-fix-barriers-when-printing-backtraces-from-all-cpus.patch
watchdog-cleanup-handling-of-false-positives.patch


                 reply	other threads:[~2021-04-30  5:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210430052050.bcj_hb0CI%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.