mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: iaa - Add global_stats file and remove individual stat files
Currently, the wq_stats output also includes the global stats, while the individual global stats are also available as separate debugfs files. Since these are all read-only, there's really no reason to have them as separate files, especially since we already display them as global stats in the wq_stats. It makes more sense to just add a separate global_stats file to display those, and remove them from the wq_stats, as well as removing the individual stats files. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -321,33 +321,30 @@ driver will generate statistics which can be accessed in debugfs at::
|
||||
|
||||
# ls -al /sys/kernel/debug/iaa-crypto/
|
||||
total 0
|
||||
drwxr-xr-x 2 root root 0 Mar 3 09:35 .
|
||||
drwx------ 47 root root 0 Mar 3 09:35 ..
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 max_acomp_delay_ns
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 max_adecomp_delay_ns
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 max_comp_delay_ns
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 max_decomp_delay_ns
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 stats_reset
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 total_comp_bytes_out
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 total_comp_calls
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 total_decomp_bytes_in
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 total_decomp_calls
|
||||
-rw-r--r-- 1 root root 0 Mar 3 09:35 wq_stats
|
||||
drwxr-xr-x 2 root root 0 Mar 3 07:55 .
|
||||
drwx------ 53 root root 0 Mar 3 07:55 ..
|
||||
-rw-r--r-- 1 root root 0 Mar 3 07:55 global_stats
|
||||
-rw-r--r-- 1 root root 0 Mar 3 07:55 stats_reset
|
||||
-rw-r--r-- 1 root root 0 Mar 3 07:55 wq_stats
|
||||
|
||||
Most of the above statisticss are self-explanatory. The wq_stats file
|
||||
shows per-wq stats, a set for each iaa device and wq in addition to
|
||||
some global stats::
|
||||
The global_stats file shows a set of global statistics collected since
|
||||
the driver has been loaded or reset::
|
||||
|
||||
# cat wq_stats
|
||||
# cat global_stats
|
||||
global stats:
|
||||
total_comp_calls: 100
|
||||
total_decomp_calls: 100
|
||||
total_comp_bytes_out: 22800
|
||||
total_decomp_bytes_in: 22800
|
||||
total_comp_calls: 4300
|
||||
total_decomp_calls: 4164
|
||||
total_sw_decomp_calls: 0
|
||||
total_comp_bytes_out: 5993989
|
||||
total_decomp_bytes_in: 5993989
|
||||
total_completion_einval_errors: 0
|
||||
total_completion_timeout_errors: 0
|
||||
total_completion_comp_buf_overflow_errors: 0
|
||||
total_completion_comp_buf_overflow_errors: 136
|
||||
|
||||
The wq_stats file shows per-wq stats, a set for each iaa device and wq
|
||||
in addition to some global stats::
|
||||
|
||||
# cat wq_stats
|
||||
iaa device:
|
||||
id: 1
|
||||
n_wqs: 1
|
||||
@@ -379,21 +376,36 @@ some global stats::
|
||||
iaa device:
|
||||
id: 5
|
||||
n_wqs: 1
|
||||
comp_calls: 100
|
||||
comp_bytes: 22800
|
||||
decomp_calls: 100
|
||||
decomp_bytes: 22800
|
||||
comp_calls: 1360
|
||||
comp_bytes: 1999776
|
||||
decomp_calls: 0
|
||||
decomp_bytes: 0
|
||||
wqs:
|
||||
name: iaa_crypto
|
||||
comp_calls: 100
|
||||
comp_bytes: 22800
|
||||
decomp_calls: 100
|
||||
decomp_bytes: 22800
|
||||
comp_calls: 1360
|
||||
comp_bytes: 1999776
|
||||
decomp_calls: 0
|
||||
decomp_bytes: 0
|
||||
|
||||
Writing 0 to 'stats_reset' resets all the stats, including the
|
||||
iaa device:
|
||||
id: 7
|
||||
n_wqs: 1
|
||||
comp_calls: 2940
|
||||
comp_bytes: 3994213
|
||||
decomp_calls: 4164
|
||||
decomp_bytes: 5993989
|
||||
wqs:
|
||||
name: iaa_crypto
|
||||
comp_calls: 2940
|
||||
comp_bytes: 3994213
|
||||
decomp_calls: 4164
|
||||
decomp_bytes: 5993989
|
||||
...
|
||||
|
||||
Writing to 'stats_reset' resets all the stats, including the
|
||||
per-device and per-wq stats::
|
||||
|
||||
# echo 0 > stats_reset
|
||||
# echo 1 > stats_reset
|
||||
# cat wq_stats
|
||||
global stats:
|
||||
total_comp_calls: 0
|
||||
|
||||
Reference in New Issue
Block a user