From: Rik van Riel <riel@surriel.com>
To: neeraj.upadhyay@kernel.org, linux-kernel@vger.kernel.org
Cc: rcu@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org,
mingo@kernel.org, peterz@infradead.org, paulmck@kernel.org,
leobras@redhat.com, imran.f.khan@oracle.com
Subject: Re: [PATCH 2/3] locking/csd_lock: Provide an indication of ongoing CSD-lock stall
Date: Sat, 13 Jul 2024 13:16:47 -0400 [thread overview]
Message-ID: <ee33a2c3e32d98b5fc04983745c47f918f9ea2d2.camel@surriel.com> (raw)
In-Reply-To: <20240713165846.216174-2-neeraj.upadhyay@kernel.org>
On Sat, 2024-07-13 at 22:28 +0530, neeraj.upadhyay@kernel.org wrote:
>
> @@ -228,6 +241,7 @@ static bool
> csd_lock_wait_toolong(call_single_data_t *csd, u64 ts0, u64 *ts1, in
> cpu = csd_lock_wait_getcpu(csd);
> pr_alert("csd: CSD lock (#%d) got unstuck on
> CPU#%02d, CPU#%02d released the lock.\n",
> *bug_id, raw_smp_processor_id(), cpu);
> + atomic_dec(&n_csd_lock_stuck);
> return true;
> }
>
So we decrement it when it gets unstuck. Good.
> @@ -251,6 +265,8 @@ static bool
> csd_lock_wait_toolong(call_single_data_t *csd, u64 ts0, u64 *ts1, in
> pr_alert("csd: %s non-responsive CSD lock (#%d) on CPU#%d,
> waiting %lld ns for CPU#%02d %pS(%ps).\n",
> firsttime ? "Detected" : "Continued", *bug_id,
> raw_smp_processor_id(), (s64)ts_delta,
> cpu, csd->func, csd->info);
> + if (firsttime)
> + atomic_dec(&n_csd_lock_stuck);
>
However, I don't see any place where it is incremented when things
get stuck, and this line decrements it when a CPU gets stuck for
the first time?
Should this be an atomic_inc?
--
All Rights Reversed.
next prev parent reply other threads:[~2024-07-13 17:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 16:56 [PATCH 0/3] CSD-lock diagnostics enhancements Neeraj Upadhyay
2024-07-13 16:58 ` [PATCH 1/3] locking/csd_lock: Print large numbers as negatives neeraj.upadhyay
2024-07-13 17:14 ` Rik van Riel
2024-07-13 16:58 ` [PATCH 2/3] locking/csd_lock: Provide an indication of ongoing CSD-lock stall neeraj.upadhyay
2024-07-13 17:16 ` Rik van Riel [this message]
2024-07-13 19:32 ` Paul E. McKenney
2024-07-13 16:58 ` [PATCH 3/3] locking/csd-lock: Use backoff for repeated reports of same incident neeraj.upadhyay
2024-07-14 0:59 ` Rik van Riel
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=ee33a2c3e32d98b5fc04983745c47f918f9ea2d2.camel@surriel.com \
--to=riel@surriel.com \
--cc=imran.f.khan@oracle.com \
--cc=kernel-team@meta.com \
--cc=leobras@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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®