From patchwork Sat Dec 21 06:31:12 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: 13917681 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 28771E77184 for ; Sat, 21 Dec 2024 06:31:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C95F76B0095; Sat, 21 Dec 2024 01:31:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C4B796B0098; Sat, 21 Dec 2024 01:31:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A49706B0096; Sat, 21 Dec 2024 01:31:28 -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 7EAE86B0093 for ; Sat, 21 Dec 2024 01:31:28 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 187A0C0F21 for ; Sat, 21 Dec 2024 06:31:28 +0000 (UTC) X-FDA: 82917994320.29.A793706 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by imf24.hostedemail.com (Postfix) with ESMTP id 69591180007 for ; Sat, 21 Dec 2024 06:31:21 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=TgiNN9QJ; spf=pass (imf24.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.20 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734762659; 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=f50u08R9goWpdr0USV7DhXM2bBprmrqJgH7aUJzx5qM=; b=F8dTy2R2FMb6uVbDuBdK7TeGl3sjyoxXtChlLnbBKkmLMMCj+D7CqShZhcihTDfY3Gtift B3nxrZL109rnzekCjB1xsT+0j6mKHLxEvxgFK3YfQz/NlmSmq5pUerQfdlTizMPxpOoa/k K6PMubokN92rNNMFazgAmH+kVnVUNLI= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=TgiNN9QJ; spf=pass (imf24.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.20 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734762659; a=rsa-sha256; cv=none; b=OutiJvR2E5osUvhYuFGYRNfjqxZCIehFJS49bd8Sghf+M/QsnfquCuB8nOdf5OGGt3pC76 tMwqczYdN2h4EWf+tBRwxn3ycMDlom95KFpH5LzDTpFuqZbYPIqwBDStZh4O6d89iL4TUs 7KSmfsmH6RxWRx4DnhBcUDuzPNiXcgk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734762686; x=1766298686; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dnKV2MmLzoI9vkZttcUmEHeNbzmt/yFATHDDvqZCCxA=; b=TgiNN9QJdXy4/+XaVMI6fZYrrm/9fN3m/GH1LSsceQ+p3wtJxKQVSDZB 0sz4RkWe3f0+Rp3zPCszeokJv69BVw1L1XjsFDh9xhroX9VWuMKUlR4Nb sstD9uteRjU2A6Vj4y9ZL6FlXw0ES1+6ekmBptvn8FCbPO6eyiMgezcMx fy5hAcKIU28dSNZDRRBwBPENv2l9AR+PtZm5XcLmoPmX/4xpj4TOXmgdk 8s+driIRUsQrOziuhS+vdr0UIaYCbPm0M2DGrb0X9ruxLGoVsMtW/8xSm 45aNPDlQLesQiGUNnGbTJD7hjn0LsjRxgbGIbKcHpWeteUTE3G1aBlmWH w==; X-CSE-ConnectionGUID: f+D4YwSyQpOE5KDhZph8Mg== X-CSE-MsgGUID: ZssN8UndTzyWB3wlqBiifw== X-IronPort-AV: E=McAfee;i="6700,10204,11292"; a="35021659" X-IronPort-AV: E=Sophos;i="6.12,253,1728975600"; d="scan'208";a="35021659" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2024 22:31:20 -0800 X-CSE-ConnectionGUID: g4t7vpBRTiCPemeEulVYqg== X-CSE-MsgGUID: R3oSL3RUTZmqIk7E3UgbMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="99184588" Received: from jf5300-b11a338t.jf.intel.com ([10.242.51.115]) by orviesa007.jf.intel.com with ESMTP; 20 Dec 2024 22:31:20 -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, 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 Cc: wajdi.k.feghali@intel.com, vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com Subject: [PATCH v5 05/12] crypto: iaa - Make async mode the default. Date: Fri, 20 Dec 2024 22:31:12 -0800 Message-Id: <20241221063119.29140-6-kanchana.p.sridhar@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241221063119.29140-1-kanchana.p.sridhar@intel.com> References: <20241221063119.29140-1-kanchana.p.sridhar@intel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 69591180007 X-Rspamd-Server: rspam12 X-Stat-Signature: eahy6p9qfz4g7mus5e5mfnttgg1gcmec X-Rspam-User: X-HE-Tag: 1734762681-632362 X-HE-Meta: U2FsdGVkX1/E8jc0HQIMpAHf/CR4G4t9D8/PYn6hS91CDqITzik3CGMe54a0ud9k1pWzy7kA1LuVCtcECmIh9pdR56s5d6uEbwM0FbK2jkEr5ASPi6JGgbW4suU+Wl6N6YvqgxhllNpfljJLi8boLjCbPaHGpoOL1kc2D+6gchWqqZn6QEnAWq3TXqqYxMns9IWKT9p2eRY6uUazd7RNmnFS7hA/TF3COoTt/xaOU2gQeNSR5lqR6lUuVbFNv3hv/QXUTjXWBhX6MezC/CjqWALQpX4Nt3xKx6HP6cU/1Z/f1YrNwZBdXCngn4XrXGUCrwlMFgpkMJSGH4VZ5kOrGA1zQTaK3quO15TEscMkbQ2s3UKym/8+dDtWys/BaGFxRFONyCEGz/YBGx+uSGJBkdY+UojQShGHQf5nmPzCdPnGpthIuQ4szFkL7Bu2gwnDA3XOD5FvPU8s/E4Yvph8e4OZw2ECCwAFrGD91z7O3ujiqKzmTtup9YzH/ak3OJBbezdhKF7WdbnrlJn9zqELYARvpiLhyW53j+DSv42iiGALsWax7GR6XkzcmVg1P/cfWRg8TAIHRO9kR09UYa3u2KKvF6VgNHg+gq+dYasujyXFdzBsrzLfNK2cki4IjfQKx6Mx4v89CAYSvZFPLuEhlPyxdH8SHG1v+c/NbZbF/7GsKy9bnXY1U3Wflu96NOiZ3WvOfrjLf/PfN6FIwmnHOSA6UQzc2FCrzuLEy3RHSWK3bUK2+wm3MjhYPLRU+sovodrZeq15DJtDrVSsZkFA8LZA+slZF7Z3mtw1Ju2fUkp5ojLM5d6bgYaBNTggSr9JjMWBKIiEGP5Qbd0d8DU9MyeA2dEadVNEHbdLIpEJLJqUgsn20lbjvDa0L9BUn1PBT2Sbbts1M8u9IEIMj5zcTznPbIfhLanvoLclqnQ9U/7N3bflCkjyoQBEOXUYEoD3TRmetTQuP3coQBP5m5v Nedxt3tm 3UArfSyEUfy9wcri+8v7EWGytoV+faYw0zAdcTW5CRmoYnd2mxhw1WvrUa3n5YEC3sENB9MYwzVGWzijQltpCw8pxGgtmG5wO8wLLBvAvCFGEJ0Jz0M6So6V9/6Mx2ojE/ebyS+dYzbF+lYuEP9fmiP3FXD46O5CA/DiGo87V4HpL8YHeU5LNBYIReQ== 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 with request chaining. Earlier, the "sync" mode used to be the default. This way, anyone who wants to use IAA for zswap/zram can do so after building the kernel, and without having to go through these steps to use async request chaining: 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 b51b0b4b9ac3..6d49f82165fe 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;