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=-4.0 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 EFECBC433E0 for ; Tue, 23 Jun 2020 04:18:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 511AA2065D for ; Tue, 23 Jun 2020 04:18:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 511AA2065D 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 D2A2E6B0002; Tue, 23 Jun 2020 00:18:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CDA2D6B0005; Tue, 23 Jun 2020 00:18:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BEFBE6B0006; Tue, 23 Jun 2020 00:18:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id A73056B0002 for ; Tue, 23 Jun 2020 00:18:08 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 221CB1DF8 for ; Tue, 23 Jun 2020 04:18:08 +0000 (UTC) X-FDA: 76959169056.07.room14_100282e26e38 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id C7EF41803F9CD for ; Tue, 23 Jun 2020 04:18:07 +0000 (UTC) X-HE-Tag: room14_100282e26e38 X-Filterd-Recvd-Size: 2710 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 23 Jun 2020 04:18:06 +0000 (UTC) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id F0189263844760CFAACA; Tue, 23 Jun 2020 12:18:01 +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:17:53 +0800 From: Barry Song To: , CC: , , , , , , , Barry Song Subject: [PATCH v2 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node Date: Tue, 23 Jun 2020 16:16:07 +1200 Message-ID: <20200623041610.7620-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.200.72] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: C7EF41803F9CD X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 several hardware 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. -v2: * fix kern-doc and some codingstyle issues according to Jonathan's comm= ent * patch 3/3 is rebased againest "[PATCH] mm/zswap: careful error path implementation in comp_prepare"[1] [1] https://lkml.org/lkml/2020/6/22/347 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 crypto/acompress.c | 8 ++++++++ crypto/api.c | 22 ++++++++++++++-------- 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, 69 insertions(+), 19 deletions(-) --=20 2.27.0