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 4B917C4829A for ; Sun, 11 Feb 2024 22:06:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A62B6B006E; Sun, 11 Feb 2024 17:06:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 656686B0072; Sun, 11 Feb 2024 17:06:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51D9F6B0074; Sun, 11 Feb 2024 17:06:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 41CE76B006E for ; Sun, 11 Feb 2024 17:06:25 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id ABE85C0890 for ; Sun, 11 Feb 2024 22:06:24 +0000 (UTC) X-FDA: 81780907488.25.3C4E1B6 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by imf14.hostedemail.com (Postfix) with ESMTP id 9CDA2100010 for ; Sun, 11 Feb 2024 22:06:21 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="gkq/YerM"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707689182; a=rsa-sha256; cv=none; b=yTvCqu4QZrvJJkiJPdqfxcAPBkKhmtP5FfdZM9iOj8lE/R2Fhg1X4jf9j8KthtwTkYjaBO CCS05Cve8BEV7Jn2UN4Uv8tOGyewDdywI3KTVFiuYt8BcQLHQV1+FgjBsmlbHoJcIYlT3S fq6A067byyCTZ5F6k93p6r9RaW9T2pg= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="gkq/YerM"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 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=1707689182; 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=oicN2AMm9h+KZOEJLRzvz+eC8IdlFn0CmcaNhCjzgco=; b=aiIDPoRR8BFOsHDllYKx74xE4+Dq71ytv7O9+F64lFL3xLwHaFsntgloRJH9KQiboWQGO/ fVfWhCAx6hLv6WZI+RSM3wImgfAaOoamzvIelylYKdVRUBM9OHgebWaZftFsyOOgo0l4hJ KD0ASJbr6bZzQPyk8l3m0gv03oMDRCA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707689181; x=1739225181; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0lt0/3dAV6b4iKc8faBrQmffiQNwh2AB2q1QDWvfliM=; b=gkq/YerMPobSKkyxwcrCI7tHaVcaZ+sqBgRusI5p/jI6HSXhhJg4bHf4 7KBLPdQ1wDUelFfnN5P9H/Nf88S1jJn1B+x4xfgLPK0tl3XBVvavRodit gPgyH3DMnxdErHJu16pG6xMeHM8uYyjHU6E9xks2yxlBWJ9mGJL45Dcbd vBqFytsVhV9IViynEPAxIVjSagsKWC1zH193uuhIkx4BQxDdSLsQ60LW4 um9bevOqChTZJpI9DcAkBQLMlWNc9k2+5tsYEnesI5aFXH0LdxQKh0+zn /j0ayLLtMwRcvcDBYPTa4xKFxz4Csdh0FLwM+EOS7lB+e4KCkZF0FW6UQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="436797324" X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="436797324" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 14:06:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="7065558" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by fmviesa005.fm.intel.com with ESMTP; 11 Feb 2024 14:06:17 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1rZHxn-0006mS-0j; Sun, 11 Feb 2024 22:06:15 +0000 Date: Mon, 12 Feb 2024 06:05:24 +0800 From: kernel test robot To: Chengming Zhou , Andrew Morton , Johannes Weiner , Yosry Ahmed , Nhat Pham Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-kernel@vger.kernel.org, Chengming Zhou Subject: Re: [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools Message-ID: <202402120503.HRNkoWyq-lkp@intel.com> References: <20240210-zswap-global-lru-v1-1-853473d7b0da@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240210-zswap-global-lru-v1-1-853473d7b0da@bytedance.com> X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9CDA2100010 X-Stat-Signature: dictm6unnmpp53w6iwmbdu1moseczq65 X-HE-Tag: 1707689181-838481 X-HE-Meta: U2FsdGVkX19nDJl9HwqXQC9CyGoGXtIvmKTBi2wyrABgpnRg6Csj33PfjwgybMFz8QDhHQMKzSk8bx+A0RTuN0ORzeVboqKjR62uO+ldTAkW8ZoCHsyAKrozf28Vhnhb1C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Xr/03bkgmyvENqQHRSQE3BMmF+awQdU0493MvDCBZy4BdzapEu3zgILYfKIqojgONyWRwDJnd4AY0VhIboWj1XddyEdyMBl7QbTwv5ZrgBxlMnQf/6qtKIGny3ahg9/+3gLRArFhQVjUbr5dbQr3c8jRfd3JXVYTET2uB5dLATMtBlxniyOrGy+XdY6jpUrzYUv1nxK4J6Jjz3mWqQIPLt8 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 Chengming, kernel test robot noticed the following build errors: [auto build test ERROR on 191d97734e41a5c9f90a2f6636fdd335ae1d435d] url: https://github.com/intel-lab-lkp/linux/commits/Chengming-Zhou/mm-zswap-global-lru-and-shrinker-shared-by-all-zswap_pools/20240211-220028 base: 191d97734e41a5c9f90a2f6636fdd335ae1d435d patch link: https://lore.kernel.org/r/20240210-zswap-global-lru-v1-1-853473d7b0da%40bytedance.com patch subject: [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools config: i386-randconfig-054-20240212 (https://download.01.org/0day-ci/archive/20240212/202402120503.HRNkoWyq-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240212/202402120503.HRNkoWyq-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/202402120503.HRNkoWyq-lkp@intel.com/ All errors (new ones prefixed by >>): >> mm/zswap.c:1300:35: error: use of undeclared identifier 'pool' 1300 | nr_backing = get_zswap_pool_size(pool) >> PAGE_SHIFT; | ^ 1 error generated. vim +/pool +1300 mm/zswap.c b5ba474f3f5187 Nhat Pham 2023-11-30 1283 b5ba474f3f5187 Nhat Pham 2023-11-30 1284 static unsigned long zswap_shrinker_count(struct shrinker *shrinker, b5ba474f3f5187 Nhat Pham 2023-11-30 1285 struct shrink_control *sc) b5ba474f3f5187 Nhat Pham 2023-11-30 1286 { b5ba474f3f5187 Nhat Pham 2023-11-30 1287 struct mem_cgroup *memcg = sc->memcg; b5ba474f3f5187 Nhat Pham 2023-11-30 1288 struct lruvec *lruvec = mem_cgroup_lruvec(memcg, NODE_DATA(sc->nid)); b5ba474f3f5187 Nhat Pham 2023-11-30 1289 unsigned long nr_backing, nr_stored, nr_freeable, nr_protected; b5ba474f3f5187 Nhat Pham 2023-11-30 1290 501a06fe8e4c18 Nhat Pham 2023-12-07 1291 if (!zswap_shrinker_enabled || !mem_cgroup_zswap_writeback_enabled(memcg)) b5ba474f3f5187 Nhat Pham 2023-11-30 1292 return 0; b5ba474f3f5187 Nhat Pham 2023-11-30 1293 b5ba474f3f5187 Nhat Pham 2023-11-30 1294 #ifdef CONFIG_MEMCG_KMEM 7d7ef0a4686abe Yosry Ahmed 2023-11-29 1295 mem_cgroup_flush_stats(memcg); b5ba474f3f5187 Nhat Pham 2023-11-30 1296 nr_backing = memcg_page_state(memcg, MEMCG_ZSWAP_B) >> PAGE_SHIFT; b5ba474f3f5187 Nhat Pham 2023-11-30 1297 nr_stored = memcg_page_state(memcg, MEMCG_ZSWAPPED); b5ba474f3f5187 Nhat Pham 2023-11-30 1298 #else b5ba474f3f5187 Nhat Pham 2023-11-30 1299 /* use pool stats instead of memcg stats */ b5ba474f3f5187 Nhat Pham 2023-11-30 @1300 nr_backing = get_zswap_pool_size(pool) >> PAGE_SHIFT; bf414d6ae81ba2 Chengming Zhou 2024-02-11 1301 nr_stored = atomic_read(&zswap.nr_stored); b5ba474f3f5187 Nhat Pham 2023-11-30 1302 #endif b5ba474f3f5187 Nhat Pham 2023-11-30 1303 b5ba474f3f5187 Nhat Pham 2023-11-30 1304 if (!nr_stored) b5ba474f3f5187 Nhat Pham 2023-11-30 1305 return 0; b5ba474f3f5187 Nhat Pham 2023-11-30 1306 b5ba474f3f5187 Nhat Pham 2023-11-30 1307 nr_protected = b5ba474f3f5187 Nhat Pham 2023-11-30 1308 atomic_long_read(&lruvec->zswap_lruvec_state.nr_zswap_protected); bf414d6ae81ba2 Chengming Zhou 2024-02-11 1309 nr_freeable = list_lru_shrink_count(&zswap.list_lru, sc); b5ba474f3f5187 Nhat Pham 2023-11-30 1310 /* b5ba474f3f5187 Nhat Pham 2023-11-30 1311 * Subtract the lru size by an estimate of the number of pages b5ba474f3f5187 Nhat Pham 2023-11-30 1312 * that should be protected. b5ba474f3f5187 Nhat Pham 2023-11-30 1313 */ b5ba474f3f5187 Nhat Pham 2023-11-30 1314 nr_freeable = nr_freeable > nr_protected ? nr_freeable - nr_protected : 0; b5ba474f3f5187 Nhat Pham 2023-11-30 1315 b5ba474f3f5187 Nhat Pham 2023-11-30 1316 /* b5ba474f3f5187 Nhat Pham 2023-11-30 1317 * Scale the number of freeable pages by the memory saving factor. b5ba474f3f5187 Nhat Pham 2023-11-30 1318 * This ensures that the better zswap compresses memory, the fewer b5ba474f3f5187 Nhat Pham 2023-11-30 1319 * pages we will evict to swap (as it will otherwise incur IO for b5ba474f3f5187 Nhat Pham 2023-11-30 1320 * relatively small memory saving). b5ba474f3f5187 Nhat Pham 2023-11-30 1321 */ b5ba474f3f5187 Nhat Pham 2023-11-30 1322 return mult_frac(nr_freeable, nr_backing, nr_stored); b5ba474f3f5187 Nhat Pham 2023-11-30 1323 } b5ba474f3f5187 Nhat Pham 2023-11-30 1324 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki