* [PATCH] crypto: qat - drop log level of msg in get_instance_node()
@ 2023-02-01 17:04 Giovanni Cabiddu
2023-02-02 16:55 ` Vladis Dronov
2023-02-10 9:47 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Giovanni Cabiddu @ 2023-02-01 17:04 UTC (permalink / raw)
To: herbert
Cc: linux-crypto, qat-linux, Giovanni Cabiddu, Vladis Dronov, Fiona Trahe
The functions qat_crypto_get_instance_node() and
qat_compression_get_instance_node() allow to get a QAT instance (ring
pair) on a device close to the node specified as input parameter.
When this is not possible, and a QAT device is available in the system,
these function return an instance on a remote node and they print a
message reporting that it is not possible to find a device on the specified
node. This is interpreted by people as an error rather than an info.
The print "Could not find a device on node" indicates that a kernel
application is running on a core in a socket that does not have a QAT
device directly attached to it and performance might suffer.
Due to the nature of the message, this can be considered as a debug
message, therefore drop the severity to debug and report it only once
to avoid flooding.
Suggested-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_common/qat_compression.c | 2 +-
drivers/crypto/qat/qat_common/qat_crypto.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/qat_compression.c b/drivers/crypto/qat/qat_common/qat_compression.c
index 9fd10f4242f8..3f1f35283266 100644
--- a/drivers/crypto/qat/qat_common/qat_compression.c
+++ b/drivers/crypto/qat/qat_common/qat_compression.c
@@ -72,7 +72,7 @@ struct qat_compression_instance *qat_compression_get_instance_node(int node)
}
if (!accel_dev) {
- pr_info("QAT: Could not find a device on node %d\n", node);
+ pr_debug_ratelimited("QAT: Could not find a device on node %d\n", node);
/* Get any started device */
list_for_each(itr, adf_devmgr_get_head()) {
struct adf_accel_dev *tmp_dev;
diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c
index e31199eade5b..40c8e74d1cf9 100644
--- a/drivers/crypto/qat/qat_common/qat_crypto.c
+++ b/drivers/crypto/qat/qat_common/qat_crypto.c
@@ -70,7 +70,7 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node)
}
if (!accel_dev) {
- pr_info("QAT: Could not find a device on node %d\n", node);
+ pr_debug_ratelimited("QAT: Could not find a device on node %d\n", node);
/* Get any started device */
list_for_each_entry(tmp_dev, adf_devmgr_get_head(), list) {
if (adf_dev_started(tmp_dev) &&
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat - drop log level of msg in get_instance_node()
2023-02-01 17:04 [PATCH] crypto: qat - drop log level of msg in get_instance_node() Giovanni Cabiddu
@ 2023-02-02 16:55 ` Vladis Dronov
2023-02-10 9:47 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Vladis Dronov @ 2023-02-02 16:55 UTC (permalink / raw)
To: Giovanni Cabiddu; +Cc: herbert, linux-crypto, qat-linux, Fiona Trahe
Hi, Giovanni, all,
On Wed, Feb 1, 2023 at 6:05 PM Giovanni Cabiddu
<giovanni.cabiddu@intel.com> wrote:
>
> The functions qat_crypto_get_instance_node() and
> qat_compression_get_instance_node() allow to get a QAT instance (ring
> pair) on a device close to the node specified as input parameter.
> When this is not possible, and a QAT device is available in the system,
> these function return an instance on a remote node and they print a
> message reporting that it is not possible to find a device on the specified
> node. This is interpreted by people as an error rather than an info.
>
> The print "Could not find a device on node" indicates that a kernel
> application is running on a core in a socket that does not have a QAT
> device directly attached to it and performance might suffer.
>
> Due to the nature of the message, this can be considered as a debug
> message, therefore drop the severity to debug and report it only once
> to avoid flooding.
>
> Suggested-by: Vladis Dronov <vdronov@redhat.com>
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> drivers/crypto/qat/qat_common/qat_compression.c | 2 +-
> drivers/crypto/qat/qat_common/qat_crypto.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/qat/qat_common/qat_compression.c b/drivers/crypto/qat/qat_common/qat_compression.c
> index 9fd10f4242f8..3f1f35283266 100644
> --- a/drivers/crypto/qat/qat_common/qat_compression.c
> +++ b/drivers/crypto/qat/qat_common/qat_compression.c
> @@ -72,7 +72,7 @@ struct qat_compression_instance *qat_compression_get_instance_node(int node)
> }
>
> if (!accel_dev) {
> - pr_info("QAT: Could not find a device on node %d\n", node);
> + pr_debug_ratelimited("QAT: Could not find a device on node %d\n", node);
> /* Get any started device */
> list_for_each(itr, adf_devmgr_get_head()) {
> struct adf_accel_dev *tmp_dev;
> diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c
> index e31199eade5b..40c8e74d1cf9 100644
> --- a/drivers/crypto/qat/qat_common/qat_crypto.c
> +++ b/drivers/crypto/qat/qat_common/qat_crypto.c
> @@ -70,7 +70,7 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node)
> }
>
> if (!accel_dev) {
> - pr_info("QAT: Could not find a device on node %d\n", node);
> + pr_debug_ratelimited("QAT: Could not find a device on node %d\n", node);
> /* Get any started device */
> list_for_each_entry(tmp_dev, adf_devmgr_get_head(), list) {
> if (adf_dev_started(tmp_dev) &&
> --
> 2.39.1
>
Thanks, the fix seems to be working. It was tested on "Intel(R) Xeon(R)
Platinum 8468H / Sapphire Rapids 4 skt (SPR) XCC-SP, Qual E-3
stepping" machine with 8086:4940 (rev 40) QAT device:
Without the fix:
# dmesg | grep "QAT: Could not find a device" | wc -l
498
With the fix:
# dmesg | grep "QAT: Could not find a device"
<not output>
So,
Reviewed-by: Vladis Dronov <vdronov@redhat.com>
Tested-by: Vladis Dronov <vdronov@redhat.com>
Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat - drop log level of msg in get_instance_node()
2023-02-01 17:04 [PATCH] crypto: qat - drop log level of msg in get_instance_node() Giovanni Cabiddu
2023-02-02 16:55 ` Vladis Dronov
@ 2023-02-10 9:47 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2023-02-10 9:47 UTC (permalink / raw)
To: Giovanni Cabiddu; +Cc: linux-crypto, qat-linux, Vladis Dronov, Fiona Trahe
On Wed, Feb 01, 2023 at 05:04:41PM +0000, Giovanni Cabiddu wrote:
> The functions qat_crypto_get_instance_node() and
> qat_compression_get_instance_node() allow to get a QAT instance (ring
> pair) on a device close to the node specified as input parameter.
> When this is not possible, and a QAT device is available in the system,
> these function return an instance on a remote node and they print a
> message reporting that it is not possible to find a device on the specified
> node. This is interpreted by people as an error rather than an info.
>
> The print "Could not find a device on node" indicates that a kernel
> application is running on a core in a socket that does not have a QAT
> device directly attached to it and performance might suffer.
>
> Due to the nature of the message, this can be considered as a debug
> message, therefore drop the severity to debug and report it only once
> to avoid flooding.
>
> Suggested-by: Vladis Dronov <vdronov@redhat.com>
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> drivers/crypto/qat/qat_common/qat_compression.c | 2 +-
> drivers/crypto/qat/qat_common/qat_crypto.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-10 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 17:04 [PATCH] crypto: qat - drop log level of msg in get_instance_node() Giovanni Cabiddu
2023-02-02 16:55 ` Vladis Dronov
2023-02-10 9:47 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.