[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203030727.5aqUHWC6-lkp@intel.com>
Date: Thu, 3 Mar 2022 07:32:40 +0800
From: kernel test robot <lkp@...el.com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [frederic-dynticks:rcu/context-tracking 14/19]
kernel/rcu/tree.c:634:6: error: redefinition of '__rcu_irq_enter_check_tick'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git rcu/context-tracking
head: e4eaff86ec91c1cbde9a113cf5232dac9f897337
commit: 5a91f02835a27bd066154ab87408505806710e19 [14/19] rcu/context-tracking: Move RCU-dynticks internal functions to context_tracking
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220303/202203030727.5aqUHWC6-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=5a91f02835a27bd066154ab87408505806710e19
git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
git fetch --no-tags frederic-dynticks rcu/context-tracking
git checkout 5a91f02835a27bd066154ab87408505806710e19
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> kernel/rcu/tree.c:634:6: error: redefinition of '__rcu_irq_enter_check_tick'
634 | void __rcu_irq_enter_check_tick(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11,
from kernel/rcu/tree.c:26:
include/linux/hardirq.h:19:20: note: previous definition of '__rcu_irq_enter_check_tick' was here
19 | static inline void __rcu_irq_enter_check_tick(void) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/rcu/tree.c:4457:
kernel/rcu/tree_plugin.h:932:13: error: static declaration of 'rcu_preempt_deferred_qs' follows non-static declaration
932 | static void rcu_preempt_deferred_qs(struct task_struct *t)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/rcupdate.h:227,
from include/linux/rcupdate_wait.h:9,
from kernel/rcu/tree.c:25:
include/linux/rcutree.h:63:6: note: previous declaration of 'rcu_preempt_deferred_qs' was here
63 | void rcu_preempt_deferred_qs(struct task_struct *t);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/rcu/tree.c:4457:
kernel/rcu/tree_plugin.h:932:13: warning: 'rcu_preempt_deferred_qs' defined but not used [-Wunused-function]
932 | static void rcu_preempt_deferred_qs(struct task_struct *t)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/__rcu_irq_enter_check_tick +634 kernel/rcu/tree.c
07325d4a90d2d84 kernel/rcu/tree.c Thomas Gleixner 2020-05-21 607
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 608 /**
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 609 * __rcu_irq_enter_check_tick - Enable scheduler tick on CPU if RCU needs it.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 610 *
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 611 * The scheduler tick is not normally enabled when CPUs enter the kernel
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 612 * from nohz_full userspace execution. After all, nohz_full userspace
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 613 * execution is an RCU quiescent state and the time executing in the kernel
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 614 * is quite short. Except of course when it isn't. And it is not hard to
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 615 * cause a large system to spend tens of seconds or even minutes looping
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 616 * in the kernel, which can cause a number of problems, include RCU CPU
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 617 * stall warnings.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 618 *
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 619 * Therefore, if a nohz_full CPU fails to report a quiescent state
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 620 * in a timely manner, the RCU grace-period kthread sets that CPU's
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 621 * ->rcu_urgent_qs flag with the expectation that the next interrupt or
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 622 * exception will invoke this function, which will turn on the scheduler
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 623 * tick, which will enable RCU to detect that CPU's quiescent states,
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 624 * for example, due to cond_resched() calls in CONFIG_PREEMPT=n kernels.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 625 * The tick will be disabled once a quiescent state is reported for
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 626 * this CPU.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 627 *
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 628 * Of course, in carefully tuned systems, there might never be an
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 629 * interrupt or exception. In that case, the RCU grace-period kthread
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 630 * will eventually cause one to happen. However, in less carefully
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 631 * controlled environments, this function allows RCU to get what it
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 632 * needs without creating otherwise useless interruptions.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 633 */
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 @634 void __rcu_irq_enter_check_tick(void)
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 635 {
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 636 struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 637
6dbce04d8417ae7 kernel/rcu/tree.c Peter Zijlstra 2020-11-16 638 // If we're here from NMI there's nothing to do.
6dbce04d8417ae7 kernel/rcu/tree.c Peter Zijlstra 2020-11-16 639 if (in_nmi())
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 640 return;
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 641
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 642 RCU_LOCKDEP_WARN(rcu_dynticks_curr_cpu_in_eqs(),
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 643 "Illegal rcu_irq_enter_check_tick() from extended quiescent state");
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 644
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 645 if (!tick_nohz_full_cpu(rdp->cpu) ||
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 646 !READ_ONCE(rdp->rcu_urgent_qs) ||
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 647 READ_ONCE(rdp->rcu_forced_tick)) {
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 648 // RCU doesn't need nohz_full help from this CPU, or it is
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 649 // already getting that help.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 650 return;
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 651 }
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 652
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 653 // We get here only when not in an extended quiescent state and
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 654 // from interrupts (as opposed to NMIs). Therefore, (1) RCU is
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 655 // already watching and (2) The fact that we are in an interrupt
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 656 // handler and that the rcu_node lock is an irq-disabled lock
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 657 // prevents self-deadlock. So we can safely recheck under the lock.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 658 // Note that the nohz_full state currently cannot change.
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 659 raw_spin_lock_rcu_node(rdp->mynode);
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 660 if (rdp->rcu_urgent_qs && !rdp->rcu_forced_tick) {
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 661 // A nohz_full CPU is in the kernel and RCU needs a
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 662 // quiescent state. Turn on the tick!
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 663 WRITE_ONCE(rdp->rcu_forced_tick, true);
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 664 tick_dep_set_cpu(rdp->cpu, TICK_DEP_BIT_RCU);
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 665 }
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 666 raw_spin_unlock_rcu_node(rdp->mynode);
aaf2bc50df1f4bf kernel/rcu/tree.c Paul E. McKenney 2020-05-21 667 }
64db4cfff99c04c kernel/rcutree.c Paul E. McKenney 2008-12-18 668
:::::: The code at line 634 was first introduced by commit
:::::: aaf2bc50df1f4bfc6857fc601fc7b21d5a18c6a1 rcu: Abstract out rcu_irq_enter_check_tick() from rcu_nmi_enter()
:::::: TO: Paul E. McKenney <paulmck@...nel.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists