]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: hisilicon - fix to return sub-optimal device when best device has no qps
authorZhou Wang <wangzhou1@hisilicon.com>
Sat, 26 Oct 2019 03:00:16 +0000 (11:00 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Nov 2019 05:42:47 +0000 (13:42 +0800)
commitdb7c11d7dec3e49f3a97d1b32542b517596ca097
treefd10d926f7904cf8446f7d2b0a5209ff49ae58dd
parent9a5dbe48fcc6dd9e7180bf98dcf3186bd14568cb
crypto: hisilicon - fix to return sub-optimal device when best device has no qps

Currently find_zip_device() finds zip device which has the min NUMA
distance with current CPU.

This patch modifies find_zip_device to return sub-optimal device when best
device has no qps. This patch sorts all devices by NUMA distance, then
finds the best zip device which has free qp.

Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Shukun Tan <tanshukun1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/qm.h
drivers/crypto/hisilicon/zip/zip_main.c