crypto: api - permit users to specify numa node of acomp hardware
authorBarry Song <song.bao.hua@hisilicon.com>
Sun, 5 Jul 2020 09:18:58 +0000 (21:18 +1200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jul 2020 08:25:23 +0000 (18:25 +1000)
commit7bc13b5b60e9412a7ddef300ce2c661eecd1fd5d
tree52f93eba50304a85d9930529db9d219c1dbc398f
parent3347c8a079d67af21760a78cc5f2abbcf06d9571
crypto: api - permit users to specify numa node of acomp hardware

For a Linux server with NUMA, there are possibly multiple (de)compressors
which are either local or remote to some NUMA node. Some drivers will
automatically use the (de)compressor near the CPU calling acomp_alloc().
However, it is not necessarily correct because users who send acomp_req
could be from different NUMA node with the CPU which allocates acomp.

Just like kernel has kmalloc() and kmalloc_node(), here crypto can have
same support.

Cc: Seth Jennings <sjenning@redhat.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/acompress.c
crypto/api.c
crypto/internal.h
include/crypto/acompress.h
include/linux/crypto.h