All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Imran Khan <imran.f.khan@oracle.com>
Cc: peterz@infradead.org, jgross@suse.com, vschneid@redhat.com,
	yury.norov@gmail.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] smp: Reduce logging due to dump_stack of CSD waiters.
Date: Fri, 28 Apr 2023 10:57:56 -0700	[thread overview]
Message-ID: <088edfa0-c1b7-407f-8b20-caf0fecfbb79@paulmck-laptop> (raw)
In-Reply-To: <20230428170006.1241472-2-imran.f.khan@oracle.com>

On Sat, Apr 29, 2023 at 03:00:05AM +1000, Imran Khan wrote:
> 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-04-28 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 17:00 [RFC PATCH 0/2] smp: Reduce logging due to dump_stack of CSD waiters Imran Khan
2023-04-28 17:00 ` [RFC PATCH 1/2] " Imran Khan
2023-04-28 17:57   ` Paul E. McKenney [this message]
2023-04-28 17:00 ` [RFC PATCH 2/2] smp: Reduce NMI traffic from CSD waiters to CSD destination Imran Khan

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=088edfa0-c1b7-407f-8b20-caf0fecfbb79@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=imran.f.khan@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.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 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.