lkml.org 
[lkml]   [2020]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC locktorture] Print ratio of acquisitions, not failures
On Thu, 23 Jan 2020, Paul E. McKenney wrote:

>The __torture_print_stats() function in locktorture.c carefully
>initializes local variable "min" to statp[0].n_lock_acquired, but
>then compares it to statp[i].n_lock_fail. Given that the .n_lock_fail
>field should normally be zero, and given the initialization, it seems
>reasonable to display the maximum and minimum number acquisitions
>instead of miscomputing the maximum and minimum number of failures.
>This commit therefore switches from failures to acquisitions.

This makes sense, thanks!

>
>Reported-by: Will Deacon <will@kernel.org>
>Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>Cc: Davidlohr Bueso <dave@stgolabs.net>
>Cc: Josh Triplett <josh@joshtriplett.org>
>Cc: Peter Zijlstra <peterz@infradead.org>

Acked-by: Davidlohr Bueso <dbueso@suse.de>

\
 
 \ /
  Last update: 2020-01-31 18:52    [W:0.067 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site