llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [davidhildenbrand:page_table_reclaim 10/10] mm/pgtable_reclaim.c:437:25: error: use of undeclared identifier 'root_mem_cgroup'; did you mean 'parent_mem_cgroup'?
@ 2024-06-15 17:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-15 17:42 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/davidhildenbrand/linux page_table_reclaim
head:   fba6b89e0737bc078c6e7ace5a0c8718e097464d
commit: fba6b89e0737bc078c6e7ace5a0c8718e097464d [10/10] mm: page table reclaim
config: i386-buildonly-randconfig-004-20240615 (https://download.01.org/0day-ci/archive/20240616/202406160112.AInpPKC6-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240616/202406160112.AInpPKC6-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/202406160112.AInpPKC6-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> mm/pgtable_reclaim.c:23:8: warning: no previous prototype for function 'lookup_pmdp' [-Wmissing-prototypes]
      23 | pmd_t *lookup_pmdp(struct mm_struct *mm, unsigned long address)
         |        ^
   mm/pgtable_reclaim.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      23 | pmd_t *lookup_pmdp(struct mm_struct *mm, unsigned long address)
         | ^
         | static 
>> mm/pgtable_reclaim.c:54:8: warning: no previous prototype for function 'lookup_pudp' [-Wmissing-prototypes]
      54 | pud_t *lookup_pudp(struct mm_struct *mm, unsigned long address)
         |        ^
   mm/pgtable_reclaim.c:54:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      54 | pud_t *lookup_pudp(struct mm_struct *mm, unsigned long address)
         | ^
         | static 
   mm/pgtable_reclaim.c:175:9: warning: variable 'pmd' set but not used [-Wunused-but-set-variable]
     175 |         pmd_t *pmd;
         |                ^
   mm/pgtable_reclaim.c:395:20: warning: unused variable 'tlb' [-Wunused-variable]
     395 |         struct mmu_gather tlb;
         |                           ^~~
>> mm/pgtable_reclaim.c:437:25: error: use of undeclared identifier 'root_mem_cgroup'; did you mean 'parent_mem_cgroup'?
     437 |         if (!memcg || memcg == root_mem_cgroup)
         |                                ^~~~~~~~~~~~~~~
         |                                parent_mem_cgroup
   include/linux/memcontrol.h:1217:34: note: 'parent_mem_cgroup' declared here
    1217 | static inline struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg)
         |                                  ^
>> mm/pgtable_reclaim.c:482:33: error: use of undeclared identifier 'zap_zero_pages'
     482 |         return sysfs_emit(buf, "%d\n", zap_zero_pages);
         |                                        ^
   mm/pgtable_reclaim.c:498:2: error: use of undeclared identifier 'zap_zero_pages'
     498 |         zap_zero_pages = value;
         |         ^
   4 warnings and 3 errors generated.


vim +437 mm/pgtable_reclaim.c

   434	
   435	void memcg_reclaim_pgtables(struct mem_cgroup *memcg)
   436	{
 > 437		if (!memcg || memcg == root_mem_cgroup)
   438			reclaim_pgtables();
   439		else
   440			mem_cgroup_scan_tasks(memcg, __memcg_reclaim_pgtables, NULL);
   441	}
   442	
   443	/*
   444	 * Try to reclaim page tables from all present processes.
   445	 *
   446	 * Note: must not be called with any mm_lock held.
   447	 */
   448	void reclaim_pgtables(void)
   449	{
   450		struct task_struct *p, *next_p;
   451	
   452		p = &init_task;
   453		get_task_struct(p);
   454		task_reclaim_pgtables(p);
   455	
   456		while (true) {
   457			rcu_read_lock();
   458			next_p = next_task(p);
   459			put_task_struct(p);
   460			p = next_p;
   461			get_task_struct(p);
   462			rcu_read_unlock();
   463	
   464			if (p == &init_task)
   465				break;
   466	
   467			task_reclaim_pgtables(p);
   468	
   469			if (unlikely(fatal_signal_pending(current)))
   470				break;
   471			cond_resched();
   472		}
   473	
   474		put_task_struct(p);
   475	}
   476	
   477	#ifdef CONFIG_SYSFS
   478	
   479	static ssize_t zap_zero_pages_show(struct kobject *kobj,
   480					      struct kobj_attribute *attr, char *buf)
   481	{
 > 482		return sysfs_emit(buf, "%d\n", zap_zero_pages);
   483	}
   484	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-15 17:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-15 17:42 [davidhildenbrand:page_table_reclaim 10/10] mm/pgtable_reclaim.c:437:25: error: use of undeclared identifier 'root_mem_cgroup'; did you mean 'parent_mem_cgroup'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).