linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 179/192] mm/zswap.c:825:17: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
@ 2023-11-29 15:42 kernel test robot
  2023-11-29 21:43 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: kernel test robot @ 2023-11-29 15:42 UTC (permalink / raw)
  To: Domenico Cerasuolo
  Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List, Nhat Pham

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   cb1d236cb1038fa1bbae9913803f1c655b86d931
commit: 70dd375afcfe1839321ea8a65749404a99f0e773 [179/192] zswap: make shrinking memcg-aware
config: x86_64-randconfig-r112-20231129 (https://download.01.org/0day-ci/archive/20231129/202311292250.RUfWGNgx-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231129/202311292250.RUfWGNgx-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/202311292250.RUfWGNgx-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/zswap.c: In function 'mem_cgroup_from_entry':
   mm/zswap.c:298:24: error: implicit declaration of function 'obj_cgroup_memcg'; did you mean 'obj_cgroup_put'? [-Werror=implicit-function-declaration]
     return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL;
                           ^~~~~~~~~~~~~~~~
                           obj_cgroup_put
   mm/zswap.c:298:55: warning: pointer/integer type mismatch in conditional expression
     return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL;
                                                          ^
   mm/zswap.c: In function 'shrink_worker':
>> mm/zswap.c:825:17: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
      css_get(&memcg->css);
                    ^~
   cc1: some warnings being treated as errors


vim +825 mm/zswap.c

   798	
   799	static void shrink_worker(struct work_struct *w)
   800	{
   801		struct zswap_pool *pool = container_of(w, typeof(*pool),
   802							shrink_work);
   803		struct mem_cgroup *memcg;
   804		int ret, failures = 0;
   805	
   806		/* global reclaim will select cgroup in a round-robin fashion. */
   807		do {
   808			spin_lock(&zswap_pools_lock);
   809			memcg = pool->next_shrink =
   810				mem_cgroup_iter_online(NULL, pool->next_shrink, NULL, true);
   811	
   812			/* full round trip */
   813			if (!memcg) {
   814				spin_unlock(&zswap_pools_lock);
   815				if (++failures == MAX_RECLAIM_RETRIES)
   816					break;
   817	
   818				goto resched;
   819			}
   820	
   821			/*
   822			 * Acquire an extra reference to the iterated memcg in case the
   823			 * original reference is dropped by the zswap offlining callback.
   824			 */
 > 825			css_get(&memcg->css);
   826			spin_unlock(&zswap_pools_lock);
   827	
   828			ret = shrink_memcg(memcg);
   829			mem_cgroup_put(memcg);
   830	
   831			if (ret == -EINVAL)
   832				break;
   833			if (ret && ++failures == MAX_RECLAIM_RETRIES)
   834				break;
   835	
   836	resched:
   837			cond_resched();
   838		} while (!zswap_can_accept());
   839	}
   840	

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-30 19:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 15:42 [akpm-mm:mm-unstable 179/192] mm/zswap.c:825:17: error: dereferencing pointer to incomplete type 'struct mem_cgroup' kernel test robot
2023-11-29 21:43 ` Andrew Morton
2023-11-29 21:53   ` Andrew Morton
2023-11-29 22:18     ` Yosry Ahmed
2023-11-29 22:29       ` Andrew Morton
2023-11-29 22:31         ` Yosry Ahmed
2023-11-29 22:53           ` Andrew Morton
2023-11-30  0:02           ` Nhat Pham
2023-11-30  0:13             ` Yosry Ahmed
2023-11-30  0:18               ` Nhat Pham
2023-11-30 19:46                 ` Nhat Pham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox