RE: [PATCH v7] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-11-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Monday, November 9, 2020 11:29 PM > To: Song Bao Hua (Barry Song) > Cc: linux...@kvack.org; linux-crypto@vger.kernel.org; > a...@linux-foundation.org; Linuxarm ; fanghao

[PATCH v7] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-11-06 Thread Barry Song
on between ZIP drivers and zswap should be built. Acked-by: Vitaly Wool Cc: Luis Claudio R. Goncalves Cc: Sebastian Andrzej Siewior Cc: Andrew Morton Cc: Herbert Xu Cc: David S. Miller Cc: Mahipal Challa Cc: Seth Jennings Cc: Dan Streetman Cc: Zhou Wang Cc: Colin Ian King Signed-off-by:

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 11:29 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 10:31 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Song Bao Hua (Barry Song) > Sent: Tuesday, September 29, 2020 10:02 AM > To: 'Sebastian Andrzej Siewior' > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger.kernel.org; lin

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 4:25 AM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-crypto@vger

[PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-08-18 Thread Barry Song
ned-off-by: Barry Song --- -v6: * rebase on top of 5.9-rc1; * move to crypto_alloc_acomp_node() API to use local ZIP hardware mm/zswap.c | 183 - 1 file changed, 138 insertions(+), 45 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index fb

RE: [RESEND PATCH v5] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-08-02 Thread Song Bao Hua (Barry Song)
e entire design requires careful thinking and > > performance evaluation. For the first step, the base with fixed connection > > between ZIP drivers and zswap should be built. > > > > Cc: Luis Claudio R. Goncalves > > Cc: Sebastian Andrzej Siewior > > Cc: And

RE: [RESEND PATCH v5] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-22 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Song Bao Hua (Barry Song) > Sent: Friday, July 17, 2020 1:51 AM > To: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net > Cc: linux-crypto@vger.kernel.org; linux...@kvack.org; > linux-ker...@vger.kernel.org

[RESEND PATCH v5] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-16 Thread Barry Song
ned-off-by: Barry Song --- v5: address two comments from Sebastian Andrzej Siewior, thanks! 1. use pointer rather than pointer's pointer for acomp_ctx; 2. fix the race while multiple zpool exist while dynamically switching comprossor and zpool type m

[PATCH v5] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-12 Thread Barry Song
on between ZIP drivers and zswap should be built. Cc: Luis Claudio R. Goncalves Cc: Sebastian Andrzej Siewior Cc: Andrew Morton Cc: Herbert Xu Cc: David S. Miller Cc: Mahipal Challa Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Zhou Wang Cc: Colin Ian King Signed-off-by:

RE: [PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Sebastian Andrzej > Siewior > Sent: Thursday, July 9, 2020 7:17 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb..

RE: [PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On > Behalf Of Sebastian Andrzej Siewior > Sent: Thursday, July 9, 2020 8:41 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; >

RE: [PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Sebastian Andrzej > Siewior > Sent: Thursday, July 9, 2020 7:39 PM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb..

RE: [PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Sebastian Andrzej > Siewior > Sent: Thursday, July 9, 2020 3:00 AM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb..

RE: [PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Sebastian Andrzej > Siewior > Sent: Thursday, July 9, 2020 3:00 AM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb..

[PATCH v4] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-07 Thread Barry Song
Wool Cc: Zhou Wang Cc: Colin Ian King Signed-off-by: Barry Song --- -v4: refine changelog and comment mm/zswap.c | 177 - 1 file changed, 134 insertions(+), 43 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index fbb782924ccc..ab73957716

[PATCH v3 2/3] crypto: hisilicon/zip - permit users to specify NUMA node

2020-07-05 Thread Barry Song
If users don't specify NUMA node, the driver will use the ZIP module near the CPU allocating acomp. Otherwise, it uses the ZIP module according to the requirement of users. Cc: Zhou Wang Signed-off-by: Barry Song --- drivers/crypto/hisilicon/zip/zip.h| 2 +- drivers/crypto/hisi

[PATCH v3 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node

2020-07-05 Thread Barry Song
like kmalloc and kmalloc_node. Similar optimization may be done for crypto. -v3: move to use kzalloc_node according to Herbert's comment -v2: cleanup according to Jonathan Cameron's comment Barry Song (3): crypto: permit users to specify numa node of acomp hardware crypto: hisilic

[PATCH v3 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req

2020-07-05 Thread Barry Song
S. Miller Signed-off-by: Barry Song --- this patch depends on a zswap patch which has not been merged yet: "[PATCH v3] mm/zswap: move to use crypto_acomp API for hardware acceleration" https://lkml.org/lkml/2020/6/26/95 mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v3 1/3] crypto: permit users to specify numa node of acomp hardware

2020-07-05 Thread Barry Song
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 Cc: Dan Streetman Cc: Vitaly Wool Cc: Andrew Morton Cc: Jonathan Cameron Signed-off-by: Barry Song --- -v3: use kzalloc_node

RE: [PATCH v2 1/3] crypto: permit users to specify numa node of acomp hardware

2020-07-02 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Friday, July 3, 2020 4:11 PM > To: Song Bao Hua (Barry Song) > Cc: da...@davemloft.net; Wangzhou (B) ; > Jonathan Cameron ; > a...@linux-foundation.org; linux-crypto@vge

[PATCH v2 2/3] crypto: hisilicon/zip - permit users to specify NUMA node

2020-06-22 Thread Barry Song
If users don't specify NUMA node, the driver will use the ZIP module near the CPU allocating acomp. Otherwise, it uses the ZIP module according to the requirement of users. Cc: Zhou Wang Signed-off-by: Barry Song --- drivers/crypto/hisilicon/zip/zip.h| 2 +- drivers/crypto/hisi

[PATCH v2 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node

2020-06-22 Thread Barry Song
lkml.org/lkml/2020/6/22/347 Barry Song (3): crypto: permit users to specify numa node of acomp hardware crypto: hisilicon/zip - permit users to specify NUMA node mm/zswap: allocate acomp on the numa node committing acomp_req crypto/acompress.c| 8 ++

[PATCH v2 1/3] crypto: permit users to specify numa node of acomp hardware

2020-06-22 Thread Barry Song
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: Jonathan Cameron Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Andrew Morton Signed-off-by: Barry Song --- -v2: * fix kern-doc

[PATCH v2 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req

2020-06-22 Thread Barry Song
S. Miller" Signed-off-by: Barry Song --- -v2: patch is rebased againest "[PATCH] mm/zswap: careful error path implementation in comp_prepare" [1] [1] https://lkml.org/lkml/2020/6/22/347 mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zswap

RE: [PATCH 1/3] crypto: permit users to specify numa node of acomp hardware

2020-06-22 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jonathan Cameron > Sent: Monday, June 22, 2020 9:59 PM > To: Song Bao Hua (Barry Song) > Cc: herb...@gondor.apana.org.au; da...@davemloft.net; Seth Jennings > ; Linuxarm ; > linux-ker...@vger.kernel.org; linux...@kvack.org; > linux-c

[PATCH 3/3] mm/zswap: specify the NUMA node of acomp to use local compressors

2020-06-21 Thread Barry Song
Cc: David S. Miller" Cc: Andrew Morton Signed-off-by: Barry Song --- mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zswap.c b/mm/zswap.c index 0d914ba6b4a0..9b1aa477022e 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -437,7 +437,7 @@ stati

[PATCH 1/3] crypto: permit users to specify numa node of acomp hardware

2020-06-21 Thread Barry Song
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 Cc: Dan Streetman Cc: Vitaly Wool Cc: Andrew Morton Signed-off-by: Barry Song --- crypto/acompress.c | 8

[PATCH 2/3] crypto: hisilicon/zip - permit users to specify NUMA node

2020-06-21 Thread Barry Song
If users don't specify NUMA node, the driver will use the ZIP module near the CPU allocating acomp. Otherwise, it uses the ZIP module according to the requirement of users. Cc: Zhou Wang Signed-off-by: Barry Song --- drivers/crypto/hisilicon/zip/zip.h| 2 +- drivers/crypto/hisi

[PATCH 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node

2020-06-21 Thread Barry Song
like kmalloc and kmalloc_node. Similar optimization may be done for crypto. Barry Song (3): crypto: permit users to specify numa node of acomp hardware crypto: hisilicon/zip - permit users to specify NUMA node mm/zswap: specify the NUMA node of acomp to use local compressors [mm/zswap pat

RE: [PATCH v2] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-06-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Vitaly Wool [mailto:vitaly.w...@konsulko.com] > Sent: Sunday, June 21, 2020 11:16 PM > To: Song Bao Hua (Barry Song) > Cc: Andrew Morton ; > herb...@gondor.apana.org.au; da...@davemloft.net; > linux-crypto@vger.kernel.org; Linux-MM ; LKM

[PATCH v2] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-06-20 Thread Barry Song
halla Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Zhou Wang Signed-off-by: Barry Song --- -v2: rebase to 5.8-rc1; cleanup commit log; cleanup to improve the readability according to Sebastian's comment mm/zswap.c | 153 ++-

[PATCH] crypto: scompress - call the completion callback for the completed acomp_req

2020-06-20 Thread Barry Song
case. And it won't break the second case in which users use the common crypto_req_done() and crypto_wait_req() only. Signed-off-by: Barry Song --- crypto/scompress.c | 4 1 file changed, 4 insertions(+) diff --git a/crypto/scompress.c b/crypto/scompress.c index 738f4f8f0f41..634b7ced9

[PATCH RESEND 1/1] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-05-13 Thread Barry Song
accelerators can still work through scomp. Signed-off-by: Barry Song --- mm/zswap.c | 150 ++--- 1 file changed, 108 insertions(+), 42 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index fbb782924ccc..44a982632deb 100644 --- a/mm/zswap.c +++ b

[PATCH RESEND 0/1] mm/zswap: move to use crypto_acomp APIs

2020-05-13 Thread Barry Song
lz4 scomp-based acomp as well. To use scomp-based acomp, another patch I sent before is needed: crypto: acomp - search acomp with scomp backend in crypto_has_acomp [2] [1] https://www.spinics.net/lists/linux-mm/msg122455.html [2] https://marc.info/?l=linux-crypto-vger&m=158822346227760&

[PATCH 1/1] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-05-01 Thread Barry Song
accelerators can still work through scomp. Signed-off-by: Barry Song --- mm/zswap.c | 150 ++--- 1 file changed, 108 insertions(+), 42 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index fbb782924ccc..44a982632deb 100644 --- a/mm/zswap.c +++ b

[PATCH 0/1] mm/zswap: move to use crypto_acomp APIs

2020-05-01 Thread Barry Song
ll. To use scomp-based acomp, another patch I sent before is needed: crypto: acomp - search acomp with scomp backend in crypto_has_acomp [2] [1] https://www.spinics.net/lists/linux-mm/msg122455.html [2] https://marc.info/?l=linux-crypto-vger&m=158822346227760&w=2 Barry Song (1): mm/

[PATCH v2] crypto: acomp - search acomp with scomp backend in crypto_has_acomp

2020-04-29 Thread Barry Song
users may call crypto_has_acomp to confirm the existence of acomp before using crypto_acomp APIs. Right now, many acomp have scomp backend, for example, lz4, lzo, deflate etc. crypto_has_acomp will return false for them even though they support acomp APIs. Signed-off-by: Barry Song --- -v2

[PATCH] crypto: acomp - search acomp with scomp backend in crypto_has_acomp

2020-04-29 Thread Barry Song
true for them is calling this APIs like crypto_has_acomp("xxx", CRYPTO_ALG_TYPE_SCOMPRESS, 0); But it looks quite weird. Signed-off-by: Barry Song --- include/crypto/acompress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/crypto/acompress.h b/incl