mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Imran Khan <imran.f.khan@oracle.com>
To: peterz@infradead.org, paulmck@kernel.org, jgross@suse.com,
	vschneid@redhat.com, yury.norov@gmail.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [RESEND PATCH 1/2] smp: Reduce logging due to dump_stack of CSD waiters.
Date: Tue,  9 May 2023 08:31:23 +1000	[thread overview]
Message-ID: <20230508223124.1438167-2-imran.f.khan@oracle.com> (raw)
In-Reply-To: <20230508223124.1438167-1-imran.f.khan@oracle.com>

If a waiter is waiting for CSD lock, its call stack will not change
between first and subsequent hang detection for the same CSD lock.
So dump_stack for the waiter only for first time detection.

This avoids excessive logging on large scale systems(with hundreds
of CPUs) where repetitive dump_stack from hundreds of CPUs can flood
the console.

Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/smp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index ab3e5dad6cfe9..b7ccba677a0a0 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -248,7 +248,8 @@ static bool csd_lock_wait_toolong(struct __call_single_data *csd, u64 ts0, u64 *
 			arch_send_call_function_single_ipi(cpu);
 		}
 	}
-	dump_stack();
+	if (firsttime)
+		dump_stack();
 	*ts1 = ts2;
 
 	return false;
-- 
2.34.1


  reply	other threads:[~2023-05-08 22:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 22:31 [RESEND PATCH 0/2] " Imran Khan
2023-05-08 22:31 ` Imran Khan [this message]
2023-05-08 22:31 ` [RESEND PATCH 2/2] smp: Reduce NMI traffic from CSD waiters to CSD destination Imran Khan
2023-05-16 12:09   ` Paul E. McKenney
2023-05-30  1:24     ` Imran Khan
2023-06-01 16:21       ` Paul E. McKenney

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=20230508223124.1438167-2-imran.f.khan@oracle.com \
    --to=imran.f.khan@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=vschneid@redhat.com \
    --cc=yury.norov@gmail.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 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®