* [ast-bpf:trylock 23/29] mm/page_alloc.c:7079:53: error: 'zone' undeclared
@ 2025-01-14 0:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-14 0:28 UTC (permalink / raw)
To: Alexei Starovoitov; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git trylock
head: 1b2329dd88553224f4ef9a26e1b22cea83b071a5
commit: da4b036e3dc46bc8ab5add0a7d4944de54182afe [23/29] mm, bpf: Introduce try_alloc_pages() for opportunistic page allocation
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20250114/202501140820.eaqK0nPJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250114/202501140820.eaqK0nPJ-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/202501140820.eaqK0nPJ-lkp@intel.com/
All errors (new ones prefixed by >>):
mm/page_alloc.c: In function 'try_alloc_pages_noprof':
>> mm/page_alloc.c:7079:53: error: 'zone' undeclared (first use in this function)
7079 | if (has_unaccepted_memory() && !list_empty(&zone->unaccepted_pages))
| ^~~~
mm/page_alloc.c:7079:53: note: each undeclared identifier is reported only once for each function it appears in
vim +/zone +7079 mm/page_alloc.c
7035
7036 struct page *try_alloc_pages_noprof(int nid, unsigned int order)
7037 {
7038 /*
7039 * Do not specify __GFP_DIRECT_RECLAIM, since direct claim is not allowed.
7040 * Do not specify __GFP_KSWAPD_RECLAIM either, since wake up of kswapd
7041 * is not safe in arbitrary context.
7042 *
7043 * These two are the conditions for gfpflags_allow_spinning() being true.
7044 *
7045 * Specify __GFP_NOWARN since failing try_alloc_pages() is not a reason
7046 * to warn. Also warn would trigger printk() which is unsafe from
7047 * various contexts. We cannot use printk_deferred_enter() to mitigate,
7048 * since the running context is unknown.
7049 *
7050 * Specify __GFP_ZERO to make sure that call to kmsan_alloc_page() below
7051 * is safe in any context. Also zeroing the page is mandatory for
7052 * BPF use cases.
7053 *
7054 * Though __GFP_NOMEMALLOC is not checked in the code path below,
7055 * specify it here to highlight that try_alloc_pages()
7056 * doesn't want to deplete reserves.
7057 */
7058 gfp_t alloc_gfp = __GFP_NOWARN | __GFP_ZERO | __GFP_NOMEMALLOC;
7059 unsigned int alloc_flags = ALLOC_TRYLOCK;
7060 struct alloc_context ac = { };
7061 struct page *page;
7062
7063 /*
7064 * In RT spin_trylock() may call raw_spin_lock() which is unsafe in NMI.
7065 * If spin_trylock() is called from hard IRQ the current task may be
7066 * waiting for one rt_spin_lock, but rt_spin_trylock() will mark the
7067 * task as the owner of another rt_spin_lock which will confuse PI
7068 * logic, so return immediately if called form hard IRQ or NMI.
7069 *
7070 * Note, irqs_disabled() case is ok. This function can be called
7071 * from raw_spin_lock_irqsave region.
7072 */
7073 if (IS_ENABLED(CONFIG_PREEMPT_RT) && (in_nmi() || in_hardirq()))
7074 return NULL;
7075 if (!pcp_allowed_order(order))
7076 return NULL;
7077
7078 #ifdef CONFIG_UNACCEPTED_MEMORY
> 7079 if (has_unaccepted_memory() && !list_empty(&zone->unaccepted_pages))
--
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:[~2025-01-14 0:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 0:28 [ast-bpf:trylock 23/29] mm/page_alloc.c:7079:53: error: 'zone' undeclared 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.