Re: [rcu:rcu/next 34/34] include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared
From: Paul E. McKenney
Date: Tue Nov 29 2016 - 15:15:45 EST
On Wed, Nov 30, 2016 at 03:23:50AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
> head: ccc0666e2049e5818c236e647cf20c552a7b053b
> commit: ccc0666e2049e5818c236e647cf20c552a7b053b [34/34] rcu: Allow boot-time use of cond_resched_rcu_qs()
> config: i386-randconfig-x008-201648 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> git checkout ccc0666e2049e5818c236e647cf20c552a7b053b
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All error/warnings (new ones prefixed by >>):
Fixed (albeit crudely) by 033a28bac0a20de78426e6faf3414637e4775fbc,
which replaces the offending commit.
Thanx, Paul
> In file included from include/linux/srcu.h:33:0,
> from include/linux/notifier.h:15,
> from include/linux/memory_hotplug.h:6,
> from include/linux/mmzone.h:777,
> from include/linux/gfp.h:5,
> from include/linux/mm.h:9,
> from mm/page_alloc.c:18:
> mm/page_alloc.c: In function '__alloc_pages_nodemask':
> >> include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> >> mm/page_alloc.c:3746:2: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> >> mm/page_alloc.c:3746:2: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> --
> In file included from include/linux/srcu.h:33:0,
> from include/linux/notifier.h:15,
> from include/linux/memory_hotplug.h:6,
> from include/linux/mmzone.h:777,
> from include/linux/gfp.h:5,
> from include/linux/mm.h:9,
> from mm/vmscan.c:16:
> mm/vmscan.c: In function 'shrink_node_memcg':
> >> include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> >> mm/vmscan.c:2355:4: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> >> mm/vmscan.c:2355:4: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> mm/vmscan.c: In function 'shrink_node':
> >> include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> mm/vmscan.c:2535:6: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> --
> In file included from include/linux/srcu.h:33:0,
> from include/linux/notifier.h:15,
> from include/linux/memory_hotplug.h:6,
> from include/linux/mmzone.h:777,
> from include/linux/gfp.h:5,
> from include/linux/mm.h:9,
> from include/linux/mman.h:4,
> from mm/mlock.c:9:
> mm/mlock.c: In function 'apply_mlockall_flags':
> >> include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> mm/mlock.c:782:3: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
> include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
> if (rcu_scheduler_active && !cond_resched()) \
> ^
> mm/mlock.c:782:3: note: in expansion of macro 'cond_resched_rcu_qs'
> cond_resched_rcu_qs();
> ^~~~~~~~~~~~~~~~~~~
>
> vim +/rcu_scheduler_active +426 include/linux/rcupdate.h
>
> 420 * This macro resembles cond_resched(), except that it is defined to
> 421 * report potential quiescent states to RCU-tasks even if the cond_resched()
> 422 * machinery were to be shut off, as some advocate for PREEMPT kernels.
> 423 */
> 424 #define cond_resched_rcu_qs() \
> 425 do { \
> > 426 if (rcu_scheduler_active && !cond_resched()) \
> 427 rcu_note_voluntary_context_switch(current); \
> 428 } while (0)
> 429
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation