tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 3016126ef302b602feaa8a7b99e4f85987536d65 commit: e1767ef2184b4a3d188596e2217e62fe757f07b3 [2409/3684] mm: mem_reliable: Show reliable meminfo config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240301/202403010836.kBJY9HM4-lkp@i...) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 325f51237252e6dab8e4e1ea1fa7acbb4faee1cd) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240301/202403010836.kBJY9HM4-lkp@i...)
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/202403010836.kBJY9HM4-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/mem_reliable.c:5: In file included from include/linux/mm.h:2181: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~
mm/mem_reliable.c:159:45: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
159 | num += global_node_page_state(NR_LRU_BASE + LRU_ACTIVE_FILE); | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ mm/mem_reliable.c:160:45: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 160 | num += global_node_page_state(NR_LRU_BASE + LRU_INACTIVE_FILE); | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ 7 warnings generated.
vim +159 mm/mem_reliable.c
133 134 void reliable_report_meminfo(struct seq_file *m) 135 { 136 if (!mem_reliable_is_enabled()) 137 return; 138 139 seq_printf(m, "ReliableTotal: %8lu kB\n", 140 PAGES_TO_KB(total_reliable_pages())); 141 seq_printf(m, "ReliableUsed: %8lu kB\n", 142 PAGES_TO_KB(used_reliable_pages())); 143 seq_printf(m, "ReliableTaskUsed: %8lu kB\n", 144 PAGES_TO_KB(task_reliable_used_pages())); 145 seq_printf(m, "ReliableBuddyMem: %8lu kB\n", 146 PAGES_TO_KB(free_reliable_pages())); 147 148 if (shmem_reliable_is_enabled()) { 149 unsigned long shmem_pages = (unsigned long)percpu_counter_sum( 150 &shmem_reliable_pages); 151 seq_printf(m, "ReliableShmem: %8lu kB\n", 152 PAGES_TO_KB(shmem_pages)); 153 } 154 155 if (filemap_reliable_is_enabled()) { 156 unsigned long nr_reliable_pages = 0; 157 unsigned long num = 0; 158
159 num += global_node_page_state(NR_LRU_BASE + LRU_ACTIVE_FILE);
160 num += global_node_page_state(NR_LRU_BASE + LRU_INACTIVE_FILE); 161 seq_printf(m, "FileCache: %8lu kB\n", PAGES_TO_KB(num)); 162 163 nr_reliable_pages = 164 percpu_counter_sum_positive(&pagecache_reliable_pages); 165 seq_printf(m, "ReliableFileCache: %8lu kB\n", 166 PAGES_TO_KB(nr_reliable_pages)); 167 } 168 } 169