linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <song.bao.hua@hisilicon.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <wangzhou1@hisilicon.com>, <jonathan.cameron@huawei.com>,
	<akpm@linux-foundation.org>, <linux-crypto@vger.kernel.org>,
	<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, Barry Song <song.bao.hua@hisilicon.com>,
	Seth Jennings <sjenning@redhat.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Vitaly Wool <vitaly.wool@konsulko.com>
Subject: [PATCH v3 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req
Date: Sun, 5 Jul 2020 21:19:00 +1200	[thread overview]
Message-ID: <20200705091900.29232-4-song.bao.hua@hisilicon.com> (raw)
In-Reply-To: <20200705091900.29232-1-song.bao.hua@hisilicon.com>

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@redhat.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.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




  parent reply	other threads:[~2020-07-05  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05  9:18 [PATCH v3 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node Barry Song
2020-07-05  9:18 ` [PATCH v3 1/3] crypto: permit users to specify numa node of acomp hardware Barry Song
2020-07-05  9:18 ` [PATCH v3 2/3] crypto: hisilicon/zip - permit users to specify NUMA node Barry Song
2020-07-05  9:19 ` Barry Song [this message]
2020-07-09 12:55 ` [PATCH v3 0/3] crypto: allow users to specify acomp hardware from a desired " Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200705091900.29232-4-song.bao.hua@hisilicon.com \
    --to=song.bao.hua@hisilicon.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=ddstreet@ieee.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxarm@huawei.com \
    --cc=sjenning@redhat.com \
    --cc=vitaly.wool@konsulko.com \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox