From: kernel test robot <lkp@intel.com>
To: Chengming Zhou <zhouchengming@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosryahmed@google.com>,
Nhat Pham <nphamcs@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org,
Chengming Zhou <zhouchengming@bytedance.com>
Subject: Re: [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools
Date: Mon, 12 Feb 2024 03:01:46 +0800 [thread overview]
Message-ID: <202402120226.TK7G37U9-lkp@intel.com> (raw)
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 <lkp@intel.com>
| 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
next prev parent reply other threads:[~2024-02-11 19:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-11 13:57 [PATCH 0/2] mm/zswap: optimize for dynamic zswap_pools Chengming Zhou
2024-02-11 13:57 ` [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools Chengming Zhou
2024-02-11 19:01 ` kernel test robot [this message]
2024-02-12 13:17 ` Chengming Zhou
2024-02-11 21:04 ` Nhat Pham
2024-02-12 13:20 ` Chengming Zhou
2024-02-11 22:05 ` kernel test robot
2024-02-13 12:57 ` Yosry Ahmed
2024-02-13 14:20 ` Chengming Zhou
2024-02-13 17:43 ` Yosry Ahmed
2024-02-11 13:57 ` [PATCH 2/2] mm/zswap: change zswap_pool kref to percpu_ref Chengming Zhou
2024-02-11 21:21 ` Nhat Pham
2024-02-12 13:29 ` Chengming Zhou
2024-02-12 18:53 ` Nhat Pham
2024-02-13 14:22 ` Chengming Zhou
2024-02-12 22:42 ` Yosry Ahmed
2024-02-13 14:31 ` Chengming Zhou
2024-02-13 17:45 ` Yosry Ahmed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202402120226.TK7G37U9-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yosryahmed@google.com \
--cc=zhouchengming@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.