From patchwork Wed Nov 6 19:20:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanchana P Sridhar X-Patchwork-Id: 13865318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ECDFD59F6B for ; Wed, 6 Nov 2024 19:21:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE40B6B0088; Wed, 6 Nov 2024 14:21:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B1D986B0089; Wed, 6 Nov 2024 14:21:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 971096B008A; Wed, 6 Nov 2024 14:21:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6985F6B0088 for ; Wed, 6 Nov 2024 14:21:14 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 12150140AA2 for ; Wed, 6 Nov 2024 19:21:14 +0000 (UTC) X-FDA: 82756637418.24.5E59A95 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by imf18.hostedemail.com (Postfix) with ESMTP id 9709C1C0010 for ; Wed, 6 Nov 2024 19:20:56 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=V5iWsLNn; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf18.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.11 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730920788; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=S7KSdyx1Yt75nyZU3ul+IeNaI1n+U4GJzibDvgrqEXQ=; b=IAlUX94zY0FMF83lGOARWHCuvNLTUHIo6LmQ9PIFW3jVPxESKHXPH5lKr1V05qjFiyAM4S Z3AW/nrLAl8Dc2JvUJXvTpLOFJiWVcd93r3BYCrMG6Ep1N66g8xDFqoH6OxcmVK52Pu5bX LLNxvpavb4YwGs1vdX9F8kzIW0HNC9Q= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=V5iWsLNn; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf18.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.11 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730920788; a=rsa-sha256; cv=none; b=lz7jQxAedAPLBWePK0fyKBRyzX+Bz7n2pVT29UZer0Q4doiiQ5BKV2gQwHs1YQ/p37S/nz 5g0Di2hFZ10X4ALvYDDeaXpNOHLQsQIxtstr/Gppab/jynfbRz3z196P6OIxlqqldqQWjn pjzLrqN4/bfM2xeO+CVYEk2UD+pb/Bs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730920872; x=1762456872; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pX2jvauw5wJ2+nUrjP9yXpyaB7Rg+Ni/oUTJYJHTKmc=; b=V5iWsLNnAkBBz6t9dXRb0yf3D03W0v/BhUh6qmsk8ONXkc2EFds+Sm91 mE1QgWjzr4jWA3TAqXhheTPwHlf7pHYXmQoy9rb/NomOLGbyxsgD01DgG INr/r8PGdIrbHmB+dXmtoS2qcOb7oZvEQ7R+vZ19sSw1t9UNUBcyondi6 AxKOsgXCHJtKQVbi3OJg1Z3kSFH4LsblHj9kzkh6k/xnLc5qafAMR6sLh AEu3MyXm66aWva2LTUe3YJp/Zo2uC/KVKuWeywoy9AXSJPg5izKoX0fyH 9cwuay5ERQ9jmm/n+8IdoMW0aa9oFZGfy+XMKj2XKsjlBAlSd5jiJGFiK A==; X-CSE-ConnectionGUID: BPDcYFWcSCSJQQmWSPXUpw== X-CSE-MsgGUID: tOO5VQdASoyoV8hqbC1pww== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="41291974" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="41291974" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2024 11:21:09 -0800 X-CSE-ConnectionGUID: npxTDlYWQ0e93T1biJ33MA== X-CSE-MsgGUID: tQcgnDEyR0mPpreuHOVDRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,263,1725346800"; d="scan'208";a="88695381" Received: from unknown (HELO JF5300-B11A338T.jf.intel.com) ([10.242.51.115]) by fmviesa003.fm.intel.com with ESMTP; 06 Nov 2024 11:21:08 -0800 From: Kanchana P Sridhar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, yosryahmed@google.com, nphamcs@gmail.com, chengming.zhou@linux.dev, usamaarif642@gmail.com, ryan.roberts@arm.com, ying.huang@intel.com, 21cnbao@gmail.com, akpm@linux-foundation.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, clabbe@baylibre.com, ardb@kernel.org, ebiggers@google.com, surenb@google.com, kristen.c.accardi@intel.com, zanussi@kernel.org Cc: wajdi.k.feghali@intel.com, vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com Subject: [PATCH v3 04/13] crypto: iaa - Make async mode the default. Date: Wed, 6 Nov 2024 11:20:56 -0800 Message-Id: <20241106192105.6731-5-kanchana.p.sridhar@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241106192105.6731-1-kanchana.p.sridhar@intel.com> References: <20241106192105.6731-1-kanchana.p.sridhar@intel.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9709C1C0010 X-Stat-Signature: iawiph1rhukhn11zyap7yyhafn5hqkek X-HE-Tag: 1730920856-287602 X-HE-Meta: U2FsdGVkX188IliNRbZVmcqUl+rqb6/WwCpQ4ky41zf4iCG5iPYwUT0xbW7lX4hz3TAFVhWbvrtW5wfuPiEuWovsD8WadNzeByykd3nL2XpDN1a825x9mIGF+nNAxC8FRdnXjba496cE+VB8vBGrYvELc5N74Ry1Ox0lC0zRS/IW6z7m1SiR/1plbX5um6JFduZYzaOFOADlJ4Iq7uF6ydOBzxaVOyTE9Co3LhGXIpLGh7oecUpvteQmZVvcrjhGC68S4N1X2TxzbKS7D4+2piw8OfgErjOSUFuvfKD3CGO+0NoQqsDVK8lwfeGddYec0UOujBVb++X8F2GX8iPiB4JBHyHOZtiNBCcdZZH9KxYoPjuvPzmFL6FqsrSbFqis69YKvjILJ4QfDO1qNCTiPOaK2dyTtGYwq1pGVVK/A3PfN6ab7bsungWu/Mw+e0IP9rfAqNw8RO+wCp6txSMXfhwR9+AXvXa/+W867XPJjPgHNfzyE8hJiGZFWy1lPmCKDtDYNwmfGeAdhkV8rzlDK7SNo5uOqP8CKkPX6VhGgaE5XWdqi5iAto7s1xWlOeU7B6bhLOKYJV/jIRMes1Mbyz+nZa/oQ1nqTZNy85XyYj/DL/39C9v3pQ2Iohps7ovSOwYtQpIKaL9b5SU3pC/gnCIfoaF8lRshOTsvYDqCZIday6CMA+SgKyB1MfnVrlJ3CB/vNUjwsf+ciQuR2PQ0TMNjtghYNpGo30WvUVoqgM7X+OjlV58YCUBLDKxhj1eShBjIdslG0yaYdwcc0SUg+GksZT28ZrBmvBQLuWa0XNlZhSiJsgK5BKt4YxIaPtrbdwVS0J7GtlYQJaz4eM3kfm6XQKnj0Nrc/o9HXigCo2UJPQS+IQ44KSedlK4/YtOCPTMLeMgKOnD/1CzHOySkX61qHOER2HSUT8yyxg1e5PcnsV6CuyagIv6IvYeELJCVeYVWCRPxwGBMGjHNfKM CsoFV7Um 5SNTYoa8205gmS12ESBKXuMWJSjwIvmeZzveNKkbqaDGAj2VjgTMlDtGC6myf5jg2gg93N7lYp0gRc0Y4289q3WtEeSeHtpFvfqj0kS4uu76IXiKHLo0BG9ClWXb1FoYdzGQM3wseed1FcFE1lkwbLOBgxllHlgeiUTORymjdo2atPtAKeEAAb1S42w== 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: List-Subscribe: List-Unsubscribe: This patch makes it easier for IAA hardware acceleration in the iaa_crypto driver to be loaded by default in the most efficient/recommended "async" mode for parallel compressions/decompressions, namely, asynchronous submission of descriptors, followed by polling for job completions. Earlier, the "sync" mode used to be the default. This way, anyone that wants to use IAA can do so after building the kernel, and without having to go through these steps to use async poll: 1) disable all the IAA device/wq bindings that happen at boot time 2) rmmod iaa_crypto 3) modprobe iaa_crypto 4) echo async > /sys/bus/dsa/drivers/crypto/sync_mode 5) re-run initialization of the IAA devices and wqs Signed-off-by: Kanchana P Sridhar --- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index 3ac3a37fd2e6..13f9d22811ff 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -153,7 +153,7 @@ static DRIVER_ATTR_RW(verify_compress); */ /* Use async mode */ -static bool async_mode; +static bool async_mode = true; /* Use interrupts */ static bool use_irq;