Hi Joshua, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master v6.12-rc4 next-20241024] [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/Joshua-Hahn/memcg-hugetlb-Adding-hugeTLB-counters-to-memcg/20241024-043559 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241023203433.1568323-1-joshua.hahnjy%40gmail.com patch subject: [PATCH v2 1/1] memcg/hugetlb: Adding hugeTLB counters to memcg config: i386-buildonly-randconfig-003-20241025 (https://download.01.org/0day-ci/archive/20241025/202410250704.0LVzYMzi-lkp@xxxxxxxxx/config) compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241025/202410250704.0LVzYMzi-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202410250704.0LVzYMzi-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from mm/hugetlb.c:8: In file included from include/linux/mm.h:2213: 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_" | ~~~~~~~~~~~ ^ ~~~ In file included from mm/hugetlb.c:37: include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 49 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/hugetlb.c:1928:6: error: use of undeclared identifier 'cgrp_dfl_root' 1928 | if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING) | ^ >> mm/hugetlb.c:1928:28: error: use of undeclared identifier 'CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING' 1928 | if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING) | ^ mm/hugetlb.c:3099:6: error: use of undeclared identifier 'cgrp_dfl_root' 3099 | if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING) | ^ mm/hugetlb.c:3099:28: error: use of undeclared identifier 'CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING' 3099 | if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING) | ^ 3 warnings and 4 errors generated. vim +/cgrp_dfl_root +1928 mm/hugetlb.c 1880 1881 void free_huge_folio(struct folio *folio) 1882 { 1883 /* 1884 * Can't pass hstate in here because it is called from the 1885 * generic mm code. 1886 */ 1887 struct hstate *h = folio_hstate(folio); 1888 int nid = folio_nid(folio); 1889 struct hugepage_subpool *spool = hugetlb_folio_subpool(folio); 1890 bool restore_reserve; 1891 unsigned long flags; 1892 1893 VM_BUG_ON_FOLIO(folio_ref_count(folio), folio); 1894 VM_BUG_ON_FOLIO(folio_mapcount(folio), folio); 1895 1896 hugetlb_set_folio_subpool(folio, NULL); 1897 if (folio_test_anon(folio)) 1898 __ClearPageAnonExclusive(&folio->page); 1899 folio->mapping = NULL; 1900 restore_reserve = folio_test_hugetlb_restore_reserve(folio); 1901 folio_clear_hugetlb_restore_reserve(folio); 1902 1903 /* 1904 * If HPageRestoreReserve was set on page, page allocation consumed a 1905 * reservation. If the page was associated with a subpool, there 1906 * would have been a page reserved in the subpool before allocation 1907 * via hugepage_subpool_get_pages(). Since we are 'restoring' the 1908 * reservation, do not call hugepage_subpool_put_pages() as this will 1909 * remove the reserved page from the subpool. 1910 */ 1911 if (!restore_reserve) { 1912 /* 1913 * A return code of zero implies that the subpool will be 1914 * under its minimum size if the reservation is not restored 1915 * after page is free. Therefore, force restore_reserve 1916 * operation. 1917 */ 1918 if (hugepage_subpool_put_pages(spool, 1) == 0) 1919 restore_reserve = true; 1920 } 1921 1922 spin_lock_irqsave(&hugetlb_lock, flags); 1923 folio_clear_hugetlb_migratable(folio); 1924 hugetlb_cgroup_uncharge_folio(hstate_index(h), 1925 pages_per_huge_page(h), folio); 1926 hugetlb_cgroup_uncharge_folio_rsvd(hstate_index(h), 1927 pages_per_huge_page(h), folio); > 1928 if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING) 1929 lruvec_stat_mod_folio(folio, HUGETLB_B, -pages_per_huge_page(h)); 1930 mem_cgroup_uncharge(folio); 1931 if (restore_reserve) 1932 h->resv_huge_pages++; 1933 1934 if (folio_test_hugetlb_temporary(folio)) { 1935 remove_hugetlb_folio(h, folio, false); 1936 spin_unlock_irqrestore(&hugetlb_lock, flags); 1937 update_and_free_hugetlb_folio(h, folio, true); 1938 } else if (h->surplus_huge_pages_node[nid]) { 1939 /* remove the page from active list */ 1940 remove_hugetlb_folio(h, folio, true); 1941 spin_unlock_irqrestore(&hugetlb_lock, flags); 1942 update_and_free_hugetlb_folio(h, folio, true); 1943 } else { 1944 arch_clear_hugetlb_flags(folio); 1945 enqueue_hugetlb_folio(h, folio); 1946 spin_unlock_irqrestore(&hugetlb_lock, flags); 1947 } 1948 } 1949 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki