]> git.baikalelectronics.ru Git - kernel.git/commit
s390/zcrypt: Fix wrong comparison leading to strange load balancing
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Fri, 17 Nov 2017 15:32:22 +0000 (16:32 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 20 Nov 2017 07:51:02 +0000 (08:51 +0100)
commitaeeb5b2ac4a14a38c508059e4a1fe787e1b5d84f
treebaadd714d3f0c7a4177fbb1781ddcbb903b1a7fc
parent4ab17939596a6cb5233ee5f2040f6001a43381da
s390/zcrypt: Fix wrong comparison leading to strange load balancing

The function to decide if one zcrypt queue is better than
another one compared two pointers instead of comparing the
values where the pointers refer to. So within the same
zcrypt card when load of each queue was equal just one queue
was used. This effect only appears on relatively lite load,
typically with one thread applications.

This patch fixes the wrong comparison and now the counters
show that requests are balanced equally over all available
queues within the cards.

There is no performance improvement coming with this fix.
As long as the queue depth for an APQN queue is not touched,
processing is not faster when requests are spread over
queues within the same card hardware. So this fix only
beautifies the lszcrypt counter printouts.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/crypto/zcrypt_api.c