crypto: qat - drop log level of msg in get_instance_node()
PATCH 1/1 crypto: qat - drop log level of msg in get_instance_node()
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.
--- 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(-)
drivers/crypto/qat/qat_common/qat_compression.c +1 -1
@@ -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;
drivers/crypto/qat/qat_common/qat_crypto.c +1 -1
@@ -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) &&
Signature · 1 line
2.39.1
Hi, Giovanni, all,
Quoted 52 lines · Giovanni Cabiddu
The functions
qat_crypto_get_instance_node()andqat_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 <[email protected]>Signed-off-by Giovanni Cabiddu <[email protected]>Reviewed-by Fiona Trahe <[email protected]>--- 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(-)drivers/crypto/qat/qat_common/qat_compression.c +1
-1@@ -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;drivers/crypto/qat/qat_common/qat_crypto.c +1
-2@@ -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) && --
Quoted 2 lines
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,
Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer
Herbert Xu
maintainerQuoted 16 lines · Giovanni Cabiddu
The functions
qat_crypto_get_instance_node()andqat_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.
Quoted 7 lines
Suggested-by Vladis Dronov <[email protected]>Signed-off-by Giovanni Cabiddu <[email protected]>Reviewed-by Fiona Trahe <[email protected]>--- 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.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt