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=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 243E5C433E0 for ; Tue, 23 Jun 2020 04:18:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E15622065D for ; Tue, 23 Jun 2020 04:18:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E15622065D 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 8E5CC6B0007; Tue, 23 Jun 2020 00:18:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BB376B0008; Tue, 23 Jun 2020 00:18:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7AA1D6B000A; Tue, 23 Jun 2020 00:18:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 635386B0007 for ; Tue, 23 Jun 2020 00:18:28 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2CCC5181AC9C6 for ; Tue, 23 Jun 2020 04:18:28 +0000 (UTC) X-FDA: 76959169896.28.eyes51_1f0030326e38 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 01F796D62 for ; Tue, 23 Jun 2020 04:18:27 +0000 (UTC) X-HE-Tag: eyes51_1f0030326e38 X-Filterd-Recvd-Size: 2774 Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 23 Jun 2020 04:18:26 +0000 (UTC) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 27210302518C2C7DB378; Tue, 23 Jun 2020 12:18:12 +0800 (CST) Received: from SWX921481.china.huawei.com (10.126.200.72) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 23 Jun 2020 12:18:02 +0800 From: Barry Song To: , CC: , , , , , , , Barry Song , Seth Jennings , Dan Streetman , Vitaly Wool Subject: [PATCH v2 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req Date: Tue, 23 Jun 2020 16:16:10 +1200 Message-ID: <20200623041610.7620-4-song.bao.hua@hisilicon.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200623041610.7620-1-song.bao.hua@hisilicon.com> References: <20200623041610.7620-1-song.bao.hua@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.200.72] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 01F796D62 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 --- -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.c b/mm/zswap.c index c0a85ef46610..98db09524af6 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -438,7 +438,7 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, s= truct hlist_node *node) pr_err("Could not allocate acomp_ctx\n"); return -ENOMEM; } - 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