All of lore.kernel.org
 help / color / mirror / Atom feed
* mm/percpu.c:1770:1: warning: the frame size of 4160 bytes is larger than 2048 bytes
@ 2026-05-15 18:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-15 18:39 UTC (permalink / raw)
  To: Alexandre Ghiti; +Cc: oe-kbuild-all, 0day robot

tree:   https://github.com/intel-lab-lkp/linux/commits/Alexandre-Ghiti/mm-memcontrol-propagate-NMI-slab-stats-to-memcg-vmstats/20260515-133820
head:   241d6156e9c6e933dc5459a817c1ce186dfa12d4
commit: 3a49555d7319e2e0144add9927fc117579e6f18b mm: percpu: per-node kmem accounting using local credit
date:   13 hours ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260515/202605152051.NeYN6M3M-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260515/202605152051.NeYN6M3M-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/202605152051.NeYN6M3M-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/percpu.c: In function 'pcpu_memcg_post_alloc_hook.part.0':
>> mm/percpu.c:1770:1: warning: the frame size of 4160 bytes is larger than 2048 bytes [-Wframe-larger-than=]
    1770 | }
         | ^


vim +1770 mm/percpu.c

3c7be18ac9a06b Roman Gushchin  2020-08-11  1706  
3c7be18ac9a06b Roman Gushchin  2020-08-11  1707  static void pcpu_memcg_post_alloc_hook(struct obj_cgroup *objcg,
3c7be18ac9a06b Roman Gushchin  2020-08-11  1708  				       struct pcpu_chunk *chunk, int off,
3c7be18ac9a06b Roman Gushchin  2020-08-11  1709  				       size_t size)
3c7be18ac9a06b Roman Gushchin  2020-08-11  1710  {
3c7be18ac9a06b Roman Gushchin  2020-08-11  1711  	if (!objcg)
3c7be18ac9a06b Roman Gushchin  2020-08-11  1712  		return;
3c7be18ac9a06b Roman Gushchin  2020-08-11  1713  
8f30d2660a38be Kent Overstreet 2024-03-21  1714  	if (likely(chunk && chunk->obj_exts)) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1715  		unsigned int nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1716  		unsigned int precharge_pages = pcpu_memcg_nr_precharge_pages(size);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1717  		unsigned int pages_used = 0;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1718  		unsigned int node_credit[MAX_NUMNODES] = { 0 };
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1719  		unsigned int cpu;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1720  		int nid;
b22fbf6c1fceb0 Alexandre Ghiti 2026-05-11  1721  
c63b835d0eafc9 Roman Gushchin  2023-10-19  1722  		obj_cgroup_get(objcg);
8f30d2660a38be Kent Overstreet 2024-03-21  1723  		chunk->obj_exts[off >> PCPU_MIN_ALLOC_SHIFT].cgroup = objcg;
772616b031f06e Roman Gushchin  2020-08-11  1724  
772616b031f06e Roman Gushchin  2020-08-11  1725  		rcu_read_lock();
772616b031f06e Roman Gushchin  2020-08-11  1726  		mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B,
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1727  				pcpu_obj_total_size(size));
772616b031f06e Roman Gushchin  2020-08-11  1728  		rcu_read_unlock();
b22fbf6c1fceb0 Alexandre Ghiti 2026-05-11  1729  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1730  		for_each_possible_cpu(cpu) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1731  			unsigned int i;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1732  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1733  			for (i = 0; i < nr_pages; i++) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1734  				void *addr = (void *)pcpu_chunk_addr(chunk, cpu,
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1735  								     PFN_DOWN(off) + i);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1736  				size_t page_sz = i < nr_pages - 1 ?
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1737  					PAGE_SIZE : size - (nr_pages - 1) * PAGE_SIZE;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1738  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1739  				nid = page_to_nid(pcpu_addr_to_page(addr));
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1740  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1741  				if (node_credit[nid] < page_sz) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1742  					struct obj_cgroup *nid_objcg;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1743  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1744  					nid_objcg = obj_cgroup_get_nid(objcg, nid);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1745  					obj_cgroup_account_kmem(nid_objcg, 1);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1746  					node_credit[nid] += PAGE_SIZE;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1747  					pages_used++;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1748  				}
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1749  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1750  				node_credit[nid] -= page_sz;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1751  			}
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1752  		}
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1753  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1754  		/* Return unused precharged pages */
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1755  		if (pages_used < precharge_pages)
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1756  			obj_cgroup_unprecharge(objcg, precharge_pages - pages_used);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1757  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1758  		/* Put leftover per-node credit into stock */
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1759  		for_each_online_node(nid) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1760  			if (node_credit[nid] > 0) {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1761  				struct obj_cgroup *nid_objcg;
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1762  
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1763  				nid_objcg = obj_cgroup_get_nid(objcg, nid);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1764  				obj_cgroup_uncharge(nid_objcg, node_credit[nid]);
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1765  			}
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1766  		}
3c7be18ac9a06b Roman Gushchin  2020-08-11  1767  	} else {
3a49555d7319e2 Alexandre Ghiti 2026-05-11  1768  		obj_cgroup_unprecharge(objcg, pcpu_memcg_nr_precharge_pages(size));
3c7be18ac9a06b Roman Gushchin  2020-08-11  1769  	}
3c7be18ac9a06b Roman Gushchin  2020-08-11 @1770  }
3c7be18ac9a06b Roman Gushchin  2020-08-11  1771  

--
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:[~2026-05-15 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 18:39 mm/percpu.c:1770:1: warning: the frame size of 4160 bytes is larger than 2048 bytes kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.