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 DEDFBC433E0 for ; Mon, 22 Jun 2020 02:50:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 68135221F2 for ; Mon, 22 Jun 2020 02:50:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68135221F2 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 B208D8D0036; Sun, 21 Jun 2020 22:50:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD0A68D0032; Sun, 21 Jun 2020 22:50:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C0798D0036; Sun, 21 Jun 2020 22:50:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 80B9B8D0032 for ; Sun, 21 Jun 2020 22:50:55 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EAF2D8248047 for ; Mon, 22 Jun 2020 02:50:54 +0000 (UTC) X-FDA: 76955320428.15.bear35_270041326e2f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id BDD531814B0C7 for ; Mon, 22 Jun 2020 02:50:54 +0000 (UTC) X-HE-Tag: bear35_270041326e2f X-Filterd-Recvd-Size: 2480 Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 02:50:53 +0000 (UTC) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 262BBB429DC9B69FDCEB; Mon, 22 Jun 2020 10:50:50 +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:41 +0800 From: Barry Song To: , CC: , , , , , , Barry Song Subject: [PATCH 0/3] crypto: allow users to specify acomp hardware from a desired NUMA node Date: Mon, 22 Jun 2020 14:48:58 +1200 Message-ID: <20200622024901.12632-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.201.106] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: BDD531814B0C7 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 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. Barry Song (3): crypto: permit users to specify numa node of acomp hardware crypto: hisilicon/zip - permit users to specify NUMA node mm/zswap: specify the NUMA node of acomp to use local compressors [mm/zswap patch is on top of linux-next tree] 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 | 7 +++++++ include/linux/crypto.h | 3 ++- mm/zswap.c | 2 +- 9 files changed, 58 insertions(+), 20 deletions(-) --=20 2.27.0