2024-03-04 21:20:20

by Tom Zanussi

[permalink] [raw]
Subject: [PATCH 0/4] crypto: IAA stats bugfixes and simplifications

Hi Herbert,

While doing some testing, I noticed a discrepancy in the
decomp_bytes_in stat, which the first patch in this series (crypto:
iaa - fix decomp_bytes_in stats) fixes.

I also realized that there were some other problems unrelated to that
but also that the stats code could be simplified in a number of ways
and that some of it wasn't really useful. The stats code is debugging
code and has been helpful to quickly verify whether things are
basically working, but since it's there we should make it as accurate
and actually useful as possible.

I realize the second patch (crypto: iaa - Remove comp/decomp delay
statistics) removes the code I just fixed up in a patch you just
merged (crypto: iaa - Fix comp/decomp delay statistics) - let me know
if you want me to combine those if you want to remove the latter from
your branch...

Thanks,

Tom


*** BLURB HERE ***

Tom Zanussi (4):
crypto: iaa - fix decomp_bytes_in stats
crypto: iaa - Remove comp/decomp delay statistics
crypto: iaa - Add global_stats file and remove individual stat files
crypto: iaa - Change iaa statistics to atomic64_t

.../driver-api/crypto/iaa/iaa-crypto.rst | 76 +++++---
drivers/crypto/intel/iaa/iaa_crypto.h | 16 +-
drivers/crypto/intel/iaa/iaa_crypto_main.c | 13 +-
drivers/crypto/intel/iaa/iaa_crypto_stats.c | 183 ++++++++----------
drivers/crypto/intel/iaa/iaa_crypto_stats.h | 8 -
5 files changed, 140 insertions(+), 156 deletions(-)

--
2.34.1



2024-03-04 21:20:33

by Tom Zanussi

[permalink] [raw]
Subject: [PATCH 1/4] crypto: iaa - fix decomp_bytes_in stats

Decomp stats should use slen, not dlen. Change both the global and
per-wq stats to use the correct value.

Signed-off-by: Tom Zanussi <[email protected]>
---
drivers/crypto/intel/iaa/iaa_crypto_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c
index b54f93c64033..466bd0c71816 100644
--- a/drivers/crypto/intel/iaa/iaa_crypto_main.c
+++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c
@@ -1075,8 +1075,8 @@ static void iaa_desc_complete(struct idxd_desc *idxd_desc,
update_total_comp_bytes_out(ctx->req->dlen);
update_wq_comp_bytes(iaa_wq->wq, ctx->req->dlen);
} else {
- update_total_decomp_bytes_in(ctx->req->dlen);
- update_wq_decomp_bytes(iaa_wq->wq, ctx->req->dlen);
+ update_total_decomp_bytes_in(ctx->req->slen);
+ update_wq_decomp_bytes(iaa_wq->wq, ctx->req->slen);
}

if (ctx->compress && compression_ctx->verify_compress) {
--
2.34.1


2024-03-28 10:44:35

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 0/4] crypto: IAA stats bugfixes and simplifications

On Mon, Mar 04, 2024 at 03:20:07PM -0600, Tom Zanussi wrote:
> Hi Herbert,
>
> While doing some testing, I noticed a discrepancy in the
> decomp_bytes_in stat, which the first patch in this series (crypto:
> iaa - fix decomp_bytes_in stats) fixes.
>
> I also realized that there were some other problems unrelated to that
> but also that the stats code could be simplified in a number of ways
> and that some of it wasn't really useful. The stats code is debugging
> code and has been helpful to quickly verify whether things are
> basically working, but since it's there we should make it as accurate
> and actually useful as possible.
>
> I realize the second patch (crypto: iaa - Remove comp/decomp delay
> statistics) removes the code I just fixed up in a patch you just
> merged (crypto: iaa - Fix comp/decomp delay statistics) - let me know
> if you want me to combine those if you want to remove the latter from
> your branch...
>
> Thanks,
>
> Tom
>
>
> *** BLURB HERE ***
>
> Tom Zanussi (4):
> crypto: iaa - fix decomp_bytes_in stats
> crypto: iaa - Remove comp/decomp delay statistics
> crypto: iaa - Add global_stats file and remove individual stat files
> crypto: iaa - Change iaa statistics to atomic64_t
>
> .../driver-api/crypto/iaa/iaa-crypto.rst | 76 +++++---
> drivers/crypto/intel/iaa/iaa_crypto.h | 16 +-
> drivers/crypto/intel/iaa/iaa_crypto_main.c | 13 +-
> drivers/crypto/intel/iaa/iaa_crypto_stats.c | 183 ++++++++----------
> drivers/crypto/intel/iaa/iaa_crypto_stats.h | 8 -
> 5 files changed, 140 insertions(+), 156 deletions(-)
>
> --
> 2.34.1

All applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt