public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [arm-integrator:b4/aarch64-dynamic-kernel-stacks-v7.0-rc1 7/13] kernel/fork.c:260:28: error: use of undeclared identifier 'THREAD_PREALLOC_PAGES'
@ 2026-03-13  7:09 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-03-13  7:09 UTC (permalink / raw)
  To: Pasha Tatashin; +Cc: llvm, oe-kbuild-all, Linus Walleij

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git b4/aarch64-dynamic-kernel-stacks-v7.0-rc1
head:   3ea8b0381a0759fa0c71abae5274db2414b58e78
commit: d2ee0928bdd182aed09a1eabb9c008eef73bb442 [7/13] fork: Dynamic Kernel Stacks
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260313/202603130843.MyLfc9hR-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260313/202603130843.MyLfc9hR-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/202603130843.MyLfc9hR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/fork.c:260:28: error: use of undeclared identifier 'THREAD_PREALLOC_PAGES'
     260 |                         if (vm_area->nr_pages > THREAD_PREALLOC_PAGES)
         |                                                 ^
   1 error generated.


vim +/THREAD_PREALLOC_PAGES +260 kernel/fork.c

   238	
   239	static bool try_release_thread_stack_to_cache(struct vm_struct *vm_area)
   240	{
   241		unsigned int i;
   242		int nid;
   243	
   244		/*
   245		 * Don't cache stacks if any of the pages don't match the local domain, unless
   246		 * there is no local memory to begin with.
   247		 *
   248		 * Note that lack of local memory does not automatically mean it makes no difference
   249		 * performance-wise which other domain backs the stack. In this case we are merely
   250		 * trying to avoid constantly going to vmalloc.
   251		 */
   252		scoped_guard(preempt) {
   253			if (IS_ENABLED(CONFIG_DYNAMIC_STACK)) {
   254				/*
   255				 * If we have faulted in more than the default number of
   256				 * stack pages to a stack, don't re-use it. This makes sure
   257				 * a process never use more than THREAD_PREALLOC_PAGES
   258				 * at the outset.
   259				 */
 > 260				if (vm_area->nr_pages > THREAD_PREALLOC_PAGES)
   261					return false;
   262			}
   263			nid = numa_node_id();
   264			if (node_state(nid, N_MEMORY)) {
   265				for (i = 0; i < vm_area->nr_pages; i++) {
   266					struct page *page = vm_area->pages[i];
   267					if (page_to_nid(page) != nid)
   268						return false;
   269				}
   270			}
   271	
   272			for (i = 0; i < NR_CACHED_STACKS; i++) {
   273				struct vm_struct *tmp = NULL;
   274	
   275				if (this_cpu_try_cmpxchg(cached_stacks[i], &tmp, vm_area))
   276					return true;
   277			}
   278		}
   279		return false;
   280	}
   281	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [arm-integrator:b4/aarch64-dynamic-kernel-stacks-v7.0-rc1 7/13] kernel/fork.c:260:28: error: use of undeclared identifier 'THREAD_PREALLOC_PAGES'
@ 2026-03-16  5:35 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-03-16  5:35 UTC (permalink / raw)
  To: Pasha Tatashin; +Cc: llvm, oe-kbuild-all, Linus Walleij

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git b4/aarch64-dynamic-kernel-stacks-v7.0-rc1
head:   3ea8b0381a0759fa0c71abae5274db2414b58e78
commit: d2ee0928bdd182aed09a1eabb9c008eef73bb442 [7/13] fork: Dynamic Kernel Stacks
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20260316/202603161308.popksHjh-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project f46a5153850c1303d687233d4adf699b01041da8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260316/202603161308.popksHjh-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/202603161308.popksHjh-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/fork.c:260:28: error: use of undeclared identifier 'THREAD_PREALLOC_PAGES'
     260 |                         if (vm_area->nr_pages > THREAD_PREALLOC_PAGES)
         |                                                 ^~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +/THREAD_PREALLOC_PAGES +260 kernel/fork.c

   238	
   239	static bool try_release_thread_stack_to_cache(struct vm_struct *vm_area)
   240	{
   241		unsigned int i;
   242		int nid;
   243	
   244		/*
   245		 * Don't cache stacks if any of the pages don't match the local domain, unless
   246		 * there is no local memory to begin with.
   247		 *
   248		 * Note that lack of local memory does not automatically mean it makes no difference
   249		 * performance-wise which other domain backs the stack. In this case we are merely
   250		 * trying to avoid constantly going to vmalloc.
   251		 */
   252		scoped_guard(preempt) {
   253			if (IS_ENABLED(CONFIG_DYNAMIC_STACK)) {
   254				/*
   255				 * If we have faulted in more than the default number of
   256				 * stack pages to a stack, don't re-use it. This makes sure
   257				 * a process never use more than THREAD_PREALLOC_PAGES
   258				 * at the outset.
   259				 */
 > 260				if (vm_area->nr_pages > THREAD_PREALLOC_PAGES)
   261					return false;
   262			}
   263			nid = numa_node_id();
   264			if (node_state(nid, N_MEMORY)) {
   265				for (i = 0; i < vm_area->nr_pages; i++) {
   266					struct page *page = vm_area->pages[i];
   267					if (page_to_nid(page) != nid)
   268						return false;
   269				}
   270			}
   271	
   272			for (i = 0; i < NR_CACHED_STACKS; i++) {
   273				struct vm_struct *tmp = NULL;
   274	
   275				if (this_cpu_try_cmpxchg(cached_stacks[i], &tmp, vm_area))
   276					return true;
   277			}
   278		}
   279		return false;
   280	}
   281	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-16  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13  7:09 [arm-integrator:b4/aarch64-dynamic-kernel-stacks-v7.0-rc1 7/13] kernel/fork.c:260:28: error: use of undeclared identifier 'THREAD_PREALLOC_PAGES' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-16  5:35 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