* [akpm-mm:mm-unstable 27/106] mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations
@ 2024-11-06 13:23 kernel test robot
2024-11-06 19:54 ` Barry Song
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-11-06 13:23 UTC (permalink / raw)
To: Barry Song
Cc: llvm, 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: 7994b7ea6ac880efd0c38fedfbffd5ab8b1b7b2b
commit: c10966f19a878a66206327ebe3b85500f59f47e2 [27/106] mm: count zeromap read and set for swapout and swapin
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241106/202411062130.JXvq8Cjt-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241106/202411062130.JXvq8Cjt-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/202411062130.JXvq8Cjt-lkp@intel.com/
Note: the akpm-mm/mm-unstable HEAD 7994b7ea6ac880efd0c38fedfbffd5ab8b1b7b2b builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from mm/page_io.c:14:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
220 | count_objcg_events(objcg, SWPOUT_ZERO, nr_pages);
| ^
mm/page_io.c:220:3: note: did you mean 'count_objcg_event'?
include/linux/memcontrol.h:1763:20: note: 'count_objcg_event' declared here
1763 | static inline void count_objcg_event(struct obj_cgroup *objcg,
| ^
mm/page_io.c:532:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
532 | count_objcg_events(objcg, SWPIN_ZERO, nr_pages);
| ^
4 warnings and 2 errors generated.
vim +/count_objcg_events +220 mm/page_io.c
204
205 static void swap_zeromap_folio_set(struct folio *folio)
206 {
207 struct obj_cgroup *objcg = get_obj_cgroup_from_folio(folio);
208 struct swap_info_struct *sis = swp_swap_info(folio->swap);
209 int nr_pages = folio_nr_pages(folio);
210 swp_entry_t entry;
211 unsigned int i;
212
213 for (i = 0; i < folio_nr_pages(folio); i++) {
214 entry = page_swap_entry(folio_page(folio, i));
215 set_bit(swp_offset(entry), sis->zeromap);
216 }
217
218 count_vm_events(SWPOUT_ZERO, nr_pages);
219 if (objcg) {
> 220 count_objcg_events(objcg, SWPOUT_ZERO, nr_pages);
221 obj_cgroup_put(objcg);
222 }
223 }
224
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [akpm-mm:mm-unstable 27/106] mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations
2024-11-06 13:23 [akpm-mm:mm-unstable 27/106] mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2024-11-06 19:54 ` Barry Song
0 siblings, 0 replies; 2+ messages in thread
From: Barry Song @ 2024-11-06 19:54 UTC (permalink / raw)
To: kernel test robot, Kanchana P Sridhar
Cc: Barry Song, llvm, oe-kbuild-all, Andrew Morton,
Linux Memory Management List, Nhat Pham
On Thu, Nov 7, 2024 at 2:24 AM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 7994b7ea6ac880efd0c38fedfbffd5ab8b1b7b2b
> commit: c10966f19a878a66206327ebe3b85500f59f47e2 [27/106] mm: count zeromap read and set for swapout and swapin
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241106/202411062130.JXvq8Cjt-lkp@intel.com/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241106/202411062130.JXvq8Cjt-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/202411062130.JXvq8Cjt-lkp@intel.com/
>
> Note: the akpm-mm/mm-unstable HEAD 7994b7ea6ac880efd0c38fedfbffd5ab8b1b7b2b builds fine.
> It only hurts bisectability.
>
> All errors (new ones prefixed by >>):
>
> In file included from mm/page_io.c:14:
> In file included from include/linux/mm.h:2213:
> include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 505 | item];
> | ~~~~
> include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 512 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 525 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> >> mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 220 | count_objcg_events(objcg, SWPOUT_ZERO, nr_pages);
> | ^
> mm/page_io.c:220:3: note: did you mean 'count_objcg_event'?
> include/linux/memcontrol.h:1763:20: note: 'count_objcg_event' declared here
> 1763 | static inline void count_objcg_event(struct obj_cgroup *objcg,
> | ^
> mm/page_io.c:532:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 532 | count_objcg_events(objcg, SWPIN_ZERO, nr_pages);
> | ^
> 4 warnings and 2 errors generated.
Is it because Kanchana's "mm: change count_objcg_event() to count_objcg_events()
for batch event updates" doesn't exist?
Hi Andrew, is it possible to take this one also into mm-hotfixes-unstable?
commit 206ad49987b4670e01a3a0fd5673a823a94499d5
Author: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
Date: Mon Sep 30 22:32:19 2024 -0700
mm: change count_objcg_event() to count_objcg_events() for batch
event updates
With the introduction of zswap_store() swapping out large folios, we need
to efficiently update the objcg's memcg events once per successfully
stored folio. For instance, the 'ZSWPOUT' event needs to be incremented
by folio_nr_pages().
To facilitate this, the existing count_objcg_event() API is modified to be
count_objcg_events() that additionally accepts a count parameter. The
only existing calls to count_objcg_event() are in zswap.c - these have
been modified to call count_objcg_events() with a count of 1.
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 15c2716f9aa3..524006313b0d 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1764,8 +1764,9 @@ static inline int memcg_kmem_id(struct mem_cgroup *memcg)
struct mem_cgroup *mem_cgroup_from_slab_obj(void *p);
-static inline void count_objcg_event(struct obj_cgroup *objcg,
- enum vm_event_item idx)
+static inline void count_objcg_events(struct obj_cgroup *objcg,
+ enum vm_event_item idx,
+ unsigned long count)
{
>
>
> vim +/count_objcg_events +220 mm/page_io.c
>
> 204
> 205 static void swap_zeromap_folio_set(struct folio *folio)
> 206 {
> 207 struct obj_cgroup *objcg = get_obj_cgroup_from_folio(folio);
> 208 struct swap_info_struct *sis = swp_swap_info(folio->swap);
> 209 int nr_pages = folio_nr_pages(folio);
> 210 swp_entry_t entry;
> 211 unsigned int i;
> 212
> 213 for (i = 0; i < folio_nr_pages(folio); i++) {
> 214 entry = page_swap_entry(folio_page(folio, i));
> 215 set_bit(swp_offset(entry), sis->zeromap);
> 216 }
> 217
> 218 count_vm_events(SWPOUT_ZERO, nr_pages);
> 219 if (objcg) {
> > 220 count_objcg_events(objcg, SWPOUT_ZERO, nr_pages);
> 221 obj_cgroup_put(objcg);
> 222 }
> 223 }
> 224
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
Thanks
barry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-06 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-06 13:23 [akpm-mm:mm-unstable 27/106] mm/page_io.c:220:3: error: call to undeclared function 'count_objcg_events'; ISO C99 and later do not support implicit function declarations kernel test robot
2024-11-06 19:54 ` Barry Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox