Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2095229rdb; Sun, 11 Feb 2024 11:02:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXfZ85TWEaZf87Y7U352f3HDKC8t6axe/cGo9SYwXeZDC+QxBbNhTHsmyHYAV9AHtmEdvjiNJO0qxjTUgFWaya857EgDN1TXCLPEryJOA== X-Google-Smtp-Source: AGHT+IEdUMbTKJ+6BC1tUzigcrNoWOfMzswqOrD/df4lBmU7LW5/i7GvlFrWuY1gO42P5qo8FYRK X-Received: by 2002:a05:6402:248e:b0:561:aa6:32f5 with SMTP id q14-20020a056402248e00b005610aa632f5mr7184227eda.18.1707678138341; Sun, 11 Feb 2024 11:02:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707678138; cv=pass; d=google.com; s=arc-20160816; b=duLnTdVosesxdXPEDWHwc73xt+Ay5BhgY8vQn0gO4Z1D41LFb5vfseRhUW+slWTAHc H0NVVp3LhD/7zoZF5JxtM1qf30IkuyvjdJrEcN4Np4Ml4G4inSwUjvIWdNFJZxxvHFTb yK8H5lKObzjyG4E1ZkQXac33IwjcnLS7hvm1CAX/9kokQHoV+y6R2BUIdOTtKAeHLiTa 4KftZQGCMysAkzlAmQDlGT8JgQJ60zWo40DCp94UzN1Jmz6/zbEoSs3pMUHOoT3OW5ld Mzig6qeqWWirdrXBdREVRBLHKsmD6wgtZlI2BlBzau/w7gbn1AICwZcWJEKciLCEitVl zmTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f4FZOu1DDnCe6lZhAudjn+mHA2BM+IiYbM1Y1cOZCYc=; fh=sOzLc7AAYBKO5yQDhUGCpvFhDkRazxhO97A1JC3ZqO4=; b=xzi57Gvh5D462WlIlIU0Io4T0BakCC0RKUhP0y71GSHKgQUzjhvDVKfTGCXccGnP8k wfCgjVbY/WsH/em67DtEDHqRgXhlP+hYralTye4JgZb+Ze4AW/JFnBE1AmOfayHS4bY9 Wr0x926T6IuZcM3msA2d+GLysJn1G5I2QCmZfkN9YPY3b5WRhrMbY4nhp5E6poquT+P1 idi4po3SfGIDDMOI3hNFp1bmPo1RREjwKJRs4KiIdIddb0TMyBO/Ze7gCx+DNEq+tar9 qBNLCR2sh5kLXB4aAfq4Scdzzm0dTZojJbV7+iB7TKoe8GNbh2Gn5shEJ3tayrTYtEci eqRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPF5UWo6; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-60917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCWoll/fDnSHm4nzrzlAUIxi91fr/BulNMen+F4hWIrFEvxnmDUaK+IJ8v86sJsaKGt8F09yF2DJmKCiQ5UGN/9X2jm+Qcvfs+nK/FuETQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t30-20020a508d5e000000b005610b043f9esi2002253edt.384.2024.02.11.11.02.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 11:02:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPF5UWo6; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-60917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E534C1F21FA3 for ; Sun, 11 Feb 2024 19:02:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B7DB5C60B; Sun, 11 Feb 2024 19:02:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HPF5UWo6" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FEE7FC19 for ; Sun, 11 Feb 2024 19:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707678130; cv=none; b=FcvgYft4jV8bwSOqmvYbyM8lngNHy3htw9j4gTJeeLk91tkjhvsa3lSXll0MYNRTUi5nDqLcy6pmaJUN9XXpnV/+idWy1oDhFcClqG8ls416hpyLXpRSMLJvAmQed4z6A8HHopbglxngHQG10re7YenckdORhCM97KmqMo3HySg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707678130; c=relaxed/simple; bh=ne+I1lVvIggr9Ct6CO9zOzMdMZ2Eb6zOcxpa0xPq5/Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D3B0HMNItcXZrD3EVyuThGfb45H9yvS8cUwVLV13ggpza4+mVAEn391UTUzJJSnaJ+3obp2/RljGTSFkNPdgPTaVjWN3bsR/zyYyHDTMt7JwI3Iweh9OvSJp4gEv86j6xupvCSpVADMZkeImMWUoaOAjZt91JKaLrYb2MLuD1Wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HPF5UWo6; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707678128; x=1739214128; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ne+I1lVvIggr9Ct6CO9zOzMdMZ2Eb6zOcxpa0xPq5/Q=; b=HPF5UWo6BqDvzLra6alWKatkQCzidq77Ct31nxVEzyyHyuzltR8lfI45 v3Af61LxKSfB6R/dTdqwaFoP4sYi3yfBFVlN+rOXt3iQSUlDPSf7vq5Bw XI/eoEvjNuMRQ+/Phpf0Il0uxgsDXg5SBNuUUty12tj97RZG0k0CDVu1b CvA4SNnlBaNFFDfBPPa6W+DxSBlHDEbqyebECWxDronfJuHGuhWBga8Lz i/dqoBbTIckKw88DbLlCT0DUTrGasQlZwbtlCF24BVazhoCEAIAi3F/uz dPmVZSJ/HaNZJBaM3tfD3Oj7l3InpWZgK0uFGkZB3DPU3Uh0x+XJ/SGJm g==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="4618795" X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="4618795" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 11:02:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="2811533" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by orviesa008.jf.intel.com with ESMTP; 11 Feb 2024 11:02:06 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1rZF5X-0006ja-0D; Sun, 11 Feb 2024 19:02:03 +0000 Date: Mon, 12 Feb 2024 03:01:46 +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: <202402120226.TK7G37U9-lkp@intel.com> References: <20240210-zswap-global-lru-v1-1-853473d7b0da@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> 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: x86_64-randconfig-013-20240211 (https://download.01.org/0day-ci/archive/20240212/202402120226.TK7G37U9-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240212/202402120226.TK7G37U9-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/202402120226.TK7G37U9-lkp@intel.com/ All errors (new ones prefixed by >>): mm/zswap.c: In function 'zswap_shrinker_count': >> mm/zswap.c:1300:42: error: 'pool' undeclared (first use in this function); did you mean 'zpool'? 1300 | nr_backing = get_zswap_pool_size(pool) >> PAGE_SHIFT; | ^~~~ | zpool mm/zswap.c:1300:42: note: each undeclared identifier is reported only once for each function it appears in Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for DRM_I915_DEBUG_GEM Depends on [n]: HAS_IOMEM [=y] && DRM_I915 [=y] && EXPERT [=y] && DRM_I915_WERROR [=n] Selected by [y]: - DRM_I915_DEBUG [=y] && HAS_IOMEM [=y] && DRM_I915 [=y] && EXPERT [=y] && !COMPILE_TEST [=n] vim +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