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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA686C282C6 for ; Mon, 3 Mar 2025 11:07:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 86F486B0099; Mon, 3 Mar 2025 06:07:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7F8CE6B009A; Mon, 3 Mar 2025 06:07:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 698C26B009B; Mon, 3 Mar 2025 06:07:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 509236B0099 for ; Mon, 3 Mar 2025 06:07:55 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F3E9DB1D11 for ; Mon, 3 Mar 2025 11:07:54 +0000 (UTC) X-FDA: 83179964868.26.59BEE77 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by imf14.hostedemail.com (Postfix) with ESMTP id CAD9010000B for ; Mon, 3 Mar 2025 11:07:52 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="S/nPD3SS"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 198.175.65.18 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741000073; a=rsa-sha256; cv=none; b=sGJNeJMmYQlUcjJgplyYlxPC9LM75JDoDFm3jVF3H9FIfvIqyjjoA6hnSpRGJxDMmYEwL5 +8oe3T+PUSvGx0P3irqZyGjR4s6anCg8YN53ykzurct3o4425gbYi0CiCJ4H0tcMIhn+jp wS1ShCMNr/nuW7A+5vq1zbWEkb9rOEk= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="S/nPD3SS"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 198.175.65.18 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741000073; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lJ5lKa/J5FDcUTGdcip7s8SyFfBK1O1Z+MYQv1sk/ZE=; b=KPuzyAGLPyucxucu0RXEUoYe0srZb6rIzVEZjhCLejN5qZkYi47AeAWwlF18KBqm9JBBmX 0yoIcxb8ztVa+mZnUBHzxualqlX+dbciW8b+/KVU7J2NDeTdAynhhSvsKjqJytvEt/NmB5 F5ae0gUlOksmXD6Gg1IA/R+6kMIDtyg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741000073; x=1772536073; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DJ2wnRWfHhmjvv6CL+4i9zBDgCl/ENX8yayea55YkkI=; b=S/nPD3SS2wziRgR6+OKRT3WteNtpkLGh3gu5WUYs8zaxd7044NZoxQYr 37MvRinJcB7WJV2CS+crmgl7I8rQecXaGR4tilT3fJiadBokMAtNf2sIe F2OjCvvWgSj1c5HTaRw3n9PwGdElWTMmpqdH1zXfZIiQHGc3vsWHAPqfE ctvC4sGxl8GzHPROmhNU+OA657FV071EyBRRPDQb/45VG2wk/8DHqIZI8 NHFC1uC24dJVkE+PzVDJe6j/ZHUy3YI0O6n/HOiQ2uMid0xaFNXc7Y/8N pxHa5vfhkRsCmLC/lgbGf877V4xtAMICoy8M3zXuY6M5O62KZyennkec7 w==; X-CSE-ConnectionGUID: +W7VD+fLQbOn5x8Xg1y+Lw== X-CSE-MsgGUID: XaxLLAOUQbShKQxsk5bVOw== X-IronPort-AV: E=McAfee;i="6700,10204,11361"; a="42062444" X-IronPort-AV: E=Sophos;i="6.13,329,1732608000"; d="scan'208";a="42062444" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 03:07:52 -0800 X-CSE-ConnectionGUID: AYxTZ/JERWm2mJzhMfMIAQ== X-CSE-MsgGUID: 2DISxNRkSCeBfeF8JX8vRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,329,1732608000"; d="scan'208";a="141190254" Received: from lkp-server02.sh.intel.com (HELO 76cde6cc1f07) ([10.239.97.151]) by fmviesa002.fm.intel.com with ESMTP; 03 Mar 2025 03:07:47 -0800 Received: from kbuild by 76cde6cc1f07 with local (Exim 4.96) (envelope-from ) id 1tp3eC-000IOE-27; Mon, 03 Mar 2025 11:07:44 +0000 Date: Mon, 3 Mar 2025 19:07:21 +0800 From: kernel test robot To: Kanchana P Sridhar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, yosry.ahmed@linux.dev, nphamcs@gmail.com, chengming.zhou@linux.dev, usamaarif642@gmail.com, ryan.roberts@arm.com, 21cnbao@gmail.com, ying.huang@linux.alibaba.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: oe-kbuild-all@lists.linux.dev, wajdi.k.feghali@intel.com, vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com Subject: Re: [PATCH v8 14/14] mm: zswap: Compress batching with request chaining in zswap_store() of large folios. Message-ID: <202503031843.GyX5ZVrC-lkp@intel.com> References: <20250303084724.6490-15-kanchana.p.sridhar@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250303084724.6490-15-kanchana.p.sridhar@intel.com> X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: CAD9010000B X-Stat-Signature: uirsz79jash746113k7ua7seiz4cbi1q X-HE-Tag: 1741000072-118653 X-HE-Meta: U2FsdGVkX19Bea/VRWlHL583cEGoEY2mAy6hpgaRW1KmudaNyJqWMgKRyB3n+HkVwjPYJbBO6Bo99dxf8NnVooqxwFgskMu7B2hQ84NLujB3DUQeuO0R6UkTmcsgpchp40Vj5sLkag2CLvF18Zjujkg4Ud9xHA6Sd9v8I/EL2rLG9WXCUU6GA9oFdKgcwjvqB6Ue/dgyqFVX1xFE91izIKDVF5I9gpz7Ky2w49cAWk8A/0AQlHKBtJ/uonRNdVFjpbNvlK5Fxb6sPXsJJpWXR1G17Gu7ulF34DUGci2iTqeRzX4Ez1kO1XgN4X1qKPf+Hic6zEBviogRyXyf6Ix+GncvZG1tM/3eHvHG0odXgryKN+Ym8c5/VDuJPc03gwFiNQ98bQGyA3xvtqpSyeS5BEtv4euUzun8g95QuzqxnYTj4j5lJ0fyYZioDV1PKd2myNozJfZetrP3RjXieO9ZFhFnm5ZY9ShcOylObed4PcxQsr2LDwbQkHtZzEnM5BKkiQhb7cJr01XaV2GQrRHy5oAnO/JL4D7iKPOQ9Znu6H5SmJBGTlYGVO+6YvjomHIEIr9CYtCiHq1Bf0o49pukypeFQOtWux6VGe0Oa6mGlzyRoVFH05WfjwygyEMYOaGwJjs83LTGmUStmAx/CZ3Rjb03W3iCHdQurRD5YKcUcC1sOoD5ZYMDzWtnWnIhuSmqSrTwWj25RwwJpr7lLvw1d2iXOOoXnmvmL+xWDH//nPpiDZZo7rKGXUpaQTSF2Eo9yXCfGLAdxyWZof6fZz8xgwbwS5W6yP4Fj3A51Z8uSkMhQyO0EcYt2j1c0++85W1SdevZGhrpAmjXUth0cyKJHu0VwSlzsjFlrbIuFJxOjJvEAacznFWr5dxRhdf02KTwuFONwgfJs7sdqQ+OehQgfNDeuXmRTmvl0wickyuQQV7DiawPKVAXlWMj44gSnuTSIMY3N3RvhyJjNPv0x1i srzORe3J ILsudQeohyRzJhMEXshX3GnIOIdgTMMvzvN2QkFUIg8dX+J20vFWWpsLsS9+hz1yBZMcAdOY0nj8C+7RBv/G0LV485WJiGsiFs4DPa4d/Aymedb9cXxuYy/uUgPumIM1Gjb+GHH/P7lsUGJ2i23RGKMSYqE6TWpKPB2GSSpZFsGL8jeMEvDbk/Wn8y2oQLncxcTCuIkPvxKYwZyERuZOm75PYQzkHYjhlfJlUSs0FKCcFjs4yp3ZMU11h0OTlVvMBbeF9LRNsoMm7Nx275xz00mQvKxptWdyj3OYdtBoURBtjMgALSoan2TiNagHz7KIMz9f931Ex3kZdhKvCSflvHl5yEa7QOxtceLMJ0o91D7OflIx9xKO2fec/q9ozeTQtnvqX 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: Hi Kanchana, kernel test robot noticed the following build errors: [auto build test ERROR on 5f089a9aa987ccf72df0c6955e168e865f280603] url: https://github.com/intel-lab-lkp/linux/commits/Kanchana-P-Sridhar/crypto-acomp-Add-synchronous-asynchronous-acomp-request-chaining/20250303-164927 base: 5f089a9aa987ccf72df0c6955e168e865f280603 patch link: https://lore.kernel.org/r/20250303084724.6490-15-kanchana.p.sridhar%40intel.com patch subject: [PATCH v8 14/14] mm: zswap: Compress batching with request chaining in zswap_store() of large folios. config: csky-randconfig-002-20250303 (https://download.01.org/0day-ci/archive/20250303/202503031843.GyX5ZVrC-lkp@intel.com/config) compiler: csky-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250303/202503031843.GyX5ZVrC-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202503031843.GyX5ZVrC-lkp@intel.com/ All errors (new ones prefixed by >>): mm/zswap.c: In function 'zswap_batch_compress': >> mm/zswap.c:1166:25: error: implicit declaration of function 'prefetchw' [-Wimplicit-function-declaration] 1166 | prefetchw(entries[j]); | ^~~~~~~~~ vim +/prefetchw +1166 mm/zswap.c 1053 1054 /* 1055 * Unified code paths for compressors that do and do not support 1056 * batching. This procedure will compress multiple @nr_pages in @folio, 1057 * starting from @index. 1058 * If @batching is set to true, it will create a request chain for 1059 * compression batching. It is assumed that the caller has verified 1060 * that the acomp_ctx->nr_reqs is at least @nr_pages. 1061 * If @batching is set to false, it will process each page sequentially. 1062 * In both cases, if all compressions were successful, it will proceed 1063 * to store the compressed buffers in zpool. 1064 */ 1065 static bool zswap_batch_compress(struct folio *folio, 1066 long index, 1067 unsigned int nr_pages, 1068 struct zswap_entry *entries[], 1069 struct zswap_pool *pool, 1070 struct crypto_acomp_ctx *acomp_ctx, 1071 bool batching) 1072 { 1073 struct scatterlist inputs[ZSWAP_MAX_BATCH_SIZE]; 1074 struct scatterlist outputs[ZSWAP_MAX_BATCH_SIZE]; 1075 struct zpool *zpool = pool->zpool; 1076 int acomp_idx = 0, nr_to_store = 1; 1077 unsigned int i, j; 1078 int err = 0; 1079 gfp_t gfp; 1080 1081 lockdep_assert_held(&acomp_ctx->mutex); 1082 1083 gfp = __GFP_NORETRY | __GFP_NOWARN | __GFP_KSWAPD_RECLAIM; 1084 if (zpool_malloc_support_movable(zpool)) 1085 gfp |= __GFP_HIGHMEM | __GFP_MOVABLE; 1086 1087 for (i = 0; i < nr_pages; ++i) { 1088 struct page *page = folio_page(folio, index + i); 1089 1090 sg_init_table(&inputs[acomp_idx], 1); 1091 sg_set_page(&inputs[acomp_idx], page, PAGE_SIZE, 0); 1092 1093 /* 1094 * Each dst buffer should be of size (PAGE_SIZE * 2). 1095 * Reflect same in sg_list. 1096 */ 1097 sg_init_one(&outputs[acomp_idx], acomp_ctx->buffers[acomp_idx], PAGE_SIZE * 2); 1098 acomp_request_set_params(acomp_ctx->reqs[acomp_idx], &inputs[acomp_idx], 1099 &outputs[acomp_idx], PAGE_SIZE, PAGE_SIZE); 1100 1101 if (batching) { 1102 /* Add the acomp request to the chain. */ 1103 if (likely(i)) 1104 acomp_request_chain(acomp_ctx->reqs[acomp_idx], acomp_ctx->reqs[0]); 1105 else 1106 acomp_reqchain_init(acomp_ctx->reqs[0], 0, crypto_req_done, 1107 &acomp_ctx->wait); 1108 1109 if (i == (nr_pages - 1)) { 1110 /* Process the request chain. */ 1111 err = crypto_wait_req(crypto_acomp_compress(acomp_ctx->reqs[0]), &acomp_ctx->wait); 1112 1113 /* 1114 * Get the individual compress errors from request chaining. 1115 */ 1116 for (j = 0; j < nr_pages; ++j) { 1117 if (unlikely(acomp_request_err(acomp_ctx->reqs[j]))) { 1118 err = -EINVAL; 1119 if (acomp_request_err(acomp_ctx->reqs[j]) == -ENOSPC) 1120 zswap_reject_compress_poor++; 1121 else 1122 zswap_reject_compress_fail++; 1123 } 1124 } 1125 /* 1126 * Request chaining cleanup: 1127 * 1128 * - Clear the CRYPTO_TFM_REQ_CHAIN bit on acomp_ctx->reqs[0]. 1129 * - Reset the acomp_ctx->wait to notify acomp_ctx->reqs[0]. 1130 */ 1131 acomp_reqchain_clear(acomp_ctx->reqs[0], &acomp_ctx->wait); 1132 if (unlikely(err)) 1133 return false; 1134 j = 0; 1135 nr_to_store = nr_pages; 1136 goto store_zpool; 1137 } 1138 1139 ++acomp_idx; 1140 continue; 1141 } else { 1142 err = crypto_wait_req(crypto_acomp_compress(acomp_ctx->reqs[0]), &acomp_ctx->wait); 1143 1144 if (unlikely(err)) { 1145 if (err == -ENOSPC) 1146 zswap_reject_compress_poor++; 1147 else 1148 zswap_reject_compress_fail++; 1149 return false; 1150 } 1151 j = i; 1152 nr_to_store = 1; 1153 } 1154 1155 store_zpool: 1156 /* 1157 * All batch pages were successfully compressed. 1158 * Store the pages in zpool. 1159 */ 1160 acomp_idx = -1; 1161 while (nr_to_store--) { 1162 unsigned long handle; 1163 char *buf; 1164 1165 ++acomp_idx; > 1166 prefetchw(entries[j]); 1167 err = zpool_malloc(zpool, acomp_ctx->reqs[acomp_idx]->dlen, gfp, &handle); 1168 1169 if (unlikely(err)) { 1170 if (err == -ENOSPC) 1171 zswap_reject_compress_poor++; 1172 else 1173 zswap_reject_alloc_fail++; 1174 1175 return false; 1176 } 1177 1178 buf = zpool_map_handle(zpool, handle, ZPOOL_MM_WO); 1179 memcpy(buf, acomp_ctx->buffers[acomp_idx], acomp_ctx->reqs[acomp_idx]->dlen); 1180 zpool_unmap_handle(zpool, handle); 1181 1182 entries[j]->handle = handle; 1183 entries[j]->length = acomp_ctx->reqs[acomp_idx]->dlen; 1184 ++j; 1185 } 1186 } 1187 1188 return true; 1189 } 1190 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki