lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409140533.XqO09tth-lkp@intel.com>
Date: Sat, 14 Sep 2024 05:54:03 +0800
From: kernel test robot <lkp@...el.com>
To: Jesper Dangaard Brouer <hawk@...nel.org>, tj@...nel.org,
	cgroups@...r.kernel.org, yosryahmed@...gle.com,
	shakeel.butt@...ux.dev
Cc: oe-kbuild-all@...ts.linux.dev, Jesper Dangaard Brouer <hawk@...nel.org>,
	hannes@...xchg.org, lizefan.x@...edance.com, longman@...hat.com,
	kernel-team@...udflare.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V11] cgroup/rstat: Avoid flushing if there is an ongoing
 root flush

Hi Jesper,

kernel test robot noticed the following build errors:

[auto build test ERROR on tj-cgroup/for-next]
[also build test ERROR on axboe-block/for-next linus/master v6.11-rc7]
[cannot apply to akpm-mm/mm-everything next-20240913]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jesper-Dangaard-Brouer/cgroup-rstat-Avoid-flushing-if-there-is-an-ongoing-root-flush/20240913-010800
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
patch link:    https://lore.kernel.org/r/172616070094.2055617.17676042522679701515.stgit%40firesoul
patch subject: [PATCH V11] cgroup/rstat: Avoid flushing if there is an ongoing root flush
config: i386-randconfig-141-20240914 (https://download.01.org/0day-ci/archive/20240914/202409140533.XqO09tth-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/20240914/202409140533.XqO09tth-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140533.XqO09tth-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/zswap.c: In function 'zswap_shrinker_count':
>> mm/zswap.c:1225:17: error: implicit declaration of function 'mem_cgroup_flush_stats_relaxed'; did you mean 'mem_cgroup_flush_stats_ratelimited'? [-Werror=implicit-function-declaration]
    1225 |                 mem_cgroup_flush_stats_relaxed(memcg);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 mem_cgroup_flush_stats_ratelimited
   cc1: some warnings being treated as errors


vim +1225 mm/zswap.c

  1197	
  1198	static unsigned long zswap_shrinker_count(struct shrinker *shrinker,
  1199			struct shrink_control *sc)
  1200	{
  1201		struct mem_cgroup *memcg = sc->memcg;
  1202		struct lruvec *lruvec = mem_cgroup_lruvec(memcg, NODE_DATA(sc->nid));
  1203		unsigned long nr_backing, nr_stored, nr_freeable, nr_protected;
  1204	
  1205		if (!zswap_shrinker_enabled || !mem_cgroup_zswap_writeback_enabled(memcg))
  1206			return 0;
  1207	
  1208		/*
  1209		 * The shrinker resumes swap writeback, which will enter block
  1210		 * and may enter fs. XXX: Harmonize with vmscan.c __GFP_FS
  1211		 * rules (may_enter_fs()), which apply on a per-folio basis.
  1212		 */
  1213		if (!gfp_has_io_fs(sc->gfp_mask))
  1214			return 0;
  1215	
  1216		/*
  1217		 * For memcg, use the cgroup-wide ZSWAP stats since we don't
  1218		 * have them per-node and thus per-lruvec. Careful if memcg is
  1219		 * runtime-disabled: we can get sc->memcg == NULL, which is ok
  1220		 * for the lruvec, but not for memcg_page_state().
  1221		 *
  1222		 * Without memcg, use the zswap pool-wide metrics.
  1223		 */
  1224		if (!mem_cgroup_disabled()) {
> 1225			mem_cgroup_flush_stats_relaxed(memcg);
  1226			nr_backing = memcg_page_state(memcg, MEMCG_ZSWAP_B) >> PAGE_SHIFT;
  1227			nr_stored = memcg_page_state(memcg, MEMCG_ZSWAPPED);
  1228		} else {
  1229			nr_backing = zswap_total_pages();
  1230			nr_stored = atomic_read(&zswap_stored_pages);
  1231		}
  1232	
  1233		if (!nr_stored)
  1234			return 0;
  1235	
  1236		nr_protected =
  1237			atomic_long_read(&lruvec->zswap_lruvec_state.nr_zswap_protected);
  1238		nr_freeable = list_lru_shrink_count(&zswap_list_lru, sc);
  1239		/*
  1240		 * Subtract the lru size by an estimate of the number of pages
  1241		 * that should be protected.
  1242		 */
  1243		nr_freeable = nr_freeable > nr_protected ? nr_freeable - nr_protected : 0;
  1244	
  1245		/*
  1246		 * Scale the number of freeable pages by the memory saving factor.
  1247		 * This ensures that the better zswap compresses memory, the fewer
  1248		 * pages we will evict to swap (as it will otherwise incur IO for
  1249		 * relatively small memory saving).
  1250		 *
  1251		 * The memory saving factor calculated here takes same-filled pages into
  1252		 * account, but those are not freeable since they almost occupy no
  1253		 * space. Hence, we may scale nr_freeable down a little bit more than we
  1254		 * should if we have a lot of same-filled pages.
  1255		 */
  1256		return mult_frac(nr_freeable, nr_backing, nr_stored);
  1257	}
  1258	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ