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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no 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 67BD7C433DF for ; Sun, 5 Jul 2020 09:21:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EAB15206BE for ; Sun, 5 Jul 2020 09:21:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAB15206BE 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 25CFD8D0017; Sun, 5 Jul 2020 05:21:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20E0C8D0001; Sun, 5 Jul 2020 05:21:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FBF88D0017; Sun, 5 Jul 2020 05:21:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id F0D7E8D0001 for ; Sun, 5 Jul 2020 05:21:09 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8F2801EE6 for ; Sun, 5 Jul 2020 09:21:09 +0000 (UTC) X-FDA: 77003478258.23.egg98_1c1848426ea2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 5EE0037606 for ; Sun, 5 Jul 2020 09:21:09 +0000 (UTC) X-HE-Tag: egg98_1c1848426ea2 X-Filterd-Recvd-Size: 2786 Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Sun, 5 Jul 2020 09:21:08 +0000 (UTC) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 111141996C1192924428; Sun, 5 Jul 2020 17:21:05 +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:20:58 +0800 From: Barry Song To: , CC: , , , , , , , Barry Song Subject: [PATCH v3 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node Date: Sun, 5 Jul 2020 21:18:57 +1200 Message-ID: <20200705091900.29232-1-song.bao.hua@hisilicon.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.202.129] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 5EE0037606 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: For a typical Linux server, probably there are multiple ZIP modules. For example, numa node0 has a compressor, numa node2 has a same module. Some drivers are automatically using the module near the CPU calling acomp_alloc. But it isn't necessarily correct. Just like memory allocation API like kmalloc and kmalloc_node. Similar optimization may be done for crypto. -v3: move to use kzalloc_node according to Herbert's comment -v2: cleanup according to Jonathan Cameron's comment Barry Song (3): crypto: permit users to specify numa node of acomp hardware crypto: hisilicon/zip - permit users to specify NUMA node mm/zswap: allocate acomp on the numa node committing acomp_req[1] [1] This patch is againest 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 crypto/acompress.c | 8 ++++++++ crypto/api.c | 24 ++++++++++++++--------- crypto/internal.h | 23 ++++++++++++++++++---- drivers/crypto/hisilicon/zip/zip.h | 2 +- drivers/crypto/hisilicon/zip/zip_crypto.c | 6 +++--- drivers/crypto/hisilicon/zip/zip_main.c | 5 +++-- include/crypto/acompress.h | 18 +++++++++++++++++ include/linux/crypto.h | 2 ++ mm/zswap.c | 2 +- 9 files changed, 70 insertions(+), 20 deletions(-) --=20 2.27.0