[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee33a2c3e32d98b5fc04983745c47f918f9ea2d2.camel@surriel.com>
Date: Sat, 13 Jul 2024 13:16:47 -0400
From: Rik van Riel <riel@...riel.com>
To: neeraj.upadhyay@...nel.org, linux-kernel@...r.kernel.org
Cc: rcu@...r.kernel.org, kernel-team@...a.com, rostedt@...dmis.org,
mingo@...nel.org, peterz@...radead.org, paulmck@...nel.org,
leobras@...hat.com, imran.f.khan@...cle.com
Subject: Re: [PATCH 2/3] locking/csd_lock: Provide an indication of ongoing
CSD-lock stall
On Sat, 2024-07-13 at 22:28 +0530, neeraj.upadhyay@...nel.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.
Powered by blists - more mailing lists