[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200705091900.29232-4-song.bao.hua@hisilicon.com>
Date: Sun, 5 Jul 2020 21:19:00 +1200
From: Barry Song <song.bao.hua@...ilicon.com>
To: <herbert@...dor.apana.org.au>, <davem@...emloft.net>
CC: <wangzhou1@...ilicon.com>, <jonathan.cameron@...wei.com>,
<akpm@...ux-foundation.org>, <linux-crypto@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...wei.com>, Barry Song <song.bao.hua@...ilicon.com>,
Seth Jennings <sjenning@...hat.com>,
Dan Streetman <ddstreet@...e.org>,
Vitaly Wool <vitaly.wool@...sulko.com>
Subject: [PATCH v3 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req
zswap is allocating acomp on one different cpu with those cpus which will
eventually committing acomp_req. this patch specifies the numa node to
help compression/decompression done by local (de)compressors hardware.
Cc: Seth Jennings <sjenning@...hat.com>
Cc: Dan Streetman <ddstreet@...e.org>
Cc: Vitaly Wool <vitaly.wool@...sulko.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>
Cc: David S. Miller <davem@...emloft.net>
Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
---
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 deletion(-)
diff --git a/mm/zswap.c b/mm/zswap.c
index d170ef06c693..3c2acf51f09e 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -437,7 +437,7 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, struct hlist_node *node)
if (!acomp_ctx)
return -ENOMEM;
- acomp = crypto_alloc_acomp(pool->tfm_name, 0, 0);
+ acomp = crypto_alloc_acomp_node(pool->tfm_name, 0, 0, cpu_to_node(cpu));
if (IS_ERR(acomp)) {
pr_err("could not alloc crypto acomp %s : %ld\n",
pool->tfm_name, PTR_ERR(acomp));
--
2.27.0
Powered by blists - more mailing lists