From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38264C433E3 for ; Sun, 5 Jul 2020 09:21:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 071B420771 for ; Sun, 5 Jul 2020 09:21:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 071B420771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 62D7C8D0022; Sun, 5 Jul 2020 05:21:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5DE038D0001; Sun, 5 Jul 2020 05:21:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D2548D0022; Sun, 5 Jul 2020 05:21:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 345818D0001 for ; Sun, 5 Jul 2020 05:21:24 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E1F058248047 for ; Sun, 5 Jul 2020 09:21:23 +0000 (UTC) X-FDA: 77003478846.21.vein97_4a07a1e26ea2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id BFF52180442C2 for ; Sun, 5 Jul 2020 09:21:23 +0000 (UTC) X-HE-Tag: vein97_4a07a1e26ea2 X-Filterd-Recvd-Size: 2783 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Sun, 5 Jul 2020 09:21:19 +0000 (UTC) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 31B4DE101C8462403081; Sun, 5 Jul 2020 17:21:15 +0800 (CST) Received: from SWX921481.china.huawei.com (10.126.202.129) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Sun, 5 Jul 2020 17:21:07 +0800 From: Barry Song To: , CC: , , , , , , , Barry Song , Seth Jennings , Dan Streetman , Vitaly Wool 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 Message-ID: <20200705091900.29232-4-song.bao.hua@hisilicon.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200705091900.29232-1-song.bao.hua@hisilicon.com> References: <20200705091900.29232-1-song.bao.hua@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.202.129] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: BFF52180442C2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Cc: Dan Streetman Cc: Vitaly Wool Cc: Herbert Xu Cc: David 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 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, s= truct hlist_node *node) if (!acomp_ctx) return -ENOMEM; =20 - acomp =3D crypto_alloc_acomp(pool->tfm_name, 0, 0); + acomp =3D 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)); --=20 2.27.0