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,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 16162C433DF for ; Mon, 22 Jun 2020 02:51:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D9CD1221F2 for ; Mon, 22 Jun 2020 02:51:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9CD1221F2 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 778118D003B; Sun, 21 Jun 2020 22:51:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 704B38D0032; Sun, 21 Jun 2020 22:51:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A5238D003B; Sun, 21 Jun 2020 22:51:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0034.hostedemail.com [216.40.44.34]) by kanga.kvack.org (Postfix) with ESMTP id 41D078D0032 for ; Sun, 21 Jun 2020 22:51:04 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E55CD1EF1 for ; Mon, 22 Jun 2020 02:51:03 +0000 (UTC) X-FDA: 76955320806.02.mint96_58090bf26e2f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id C93F520001F79B18 for ; Mon, 22 Jun 2020 02:51:03 +0000 (UTC) X-HE-Tag: mint96_58090bf26e2f X-Filterd-Recvd-Size: 2663 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 02:51:03 +0000 (UTC) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 50DD9814332985B8E437; Mon, 22 Jun 2020 10:51:00 +0800 (CST) Received: from SWX921481.china.huawei.com (10.126.201.106) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 22 Jun 2020 10:50:50 +0800 From: Barry Song To: , CC: , , , , , , Barry Song , Seth Jennings , "Dan Streetman" , Vitaly Wool Subject: [PATCH 3/3] mm/zswap: specify the NUMA node of acomp to use local compressors Date: Mon, 22 Jun 2020 14:49:01 +1200 Message-ID: <20200622024901.12632-4-song.bao.hua@hisilicon.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200622024901.12632-1-song.bao.hua@hisilicon.com> References: <20200622024901.12632-1-song.bao.hua@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.201.106] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: C93F520001F79B18 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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_cpu_comp_prepare() is called on a different CPU with the CPU which will really send acomp_req. In order to use the right local compressors, this patch specifies the NUMA node to which the CPU sending acomp_req belongs. Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Herbert Xu 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 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, s= truct hlist_node *node) pr_err("Could not initialize 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_OR_NULL(acomp)) { pr_err("could not alloc crypto acomp %s : %ld\n", pool->tfm_name, PTR_ERR(acomp)); --=20 2.27.0