[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200131131353.GB4555@willie-the-truck>
Date: Fri, 31 Jan 2020 13:13:53 +0000
From: Will Deacon <will@...nel.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: dave@...olabs.net, josh@...htriplett.org,
linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: Re: [PATCH RFC locktorture] Print ratio of acquisitions, not failures
On Thu, Jan 23, 2020 at 09:27:07AM -0800, Paul E. McKenney wrote:
> diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> index 99475a6..687c1d8 100644
> --- a/kernel/locking/locktorture.c
> +++ b/kernel/locking/locktorture.c
> @@ -696,10 +696,10 @@ static void __torture_print_stats(char *page,
> if (statp[i].n_lock_fail)
> fail = true;
> sum += statp[i].n_lock_acquired;
> - if (max < statp[i].n_lock_fail)
> - max = statp[i].n_lock_fail;
> - if (min > statp[i].n_lock_fail)
> - min = statp[i].n_lock_fail;
> + if (max < statp[i].n_lock_acquired)
> + max = statp[i].n_lock_acquired;
> + if (min > statp[i].n_lock_acquired)
> + min = statp[i].n_lock_acquired;
> }
> page += sprintf(page,
> "%s: Total: %lld Max/Min: %ld/%ld %s Fail: %d %s\n",
Acked-by: Will Deacon <will@...nel.org>
Will
Powered by blists - more mailing lists