mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
rcu: Move rcu_needs_cpu() to tree.c
Now that RCU_FAST_NO_HZ is no more, there is but one implementation of the rcu_needs_cpu() function. This commit therefore moves this function from kernel/rcu/tree_plugin.c to kernel/rcu/tree.c. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
e2c73a6860
commit
bc849e9192
2 changed files with 18 additions and 16 deletions
|
@ -1075,6 +1075,24 @@ void rcu_irq_enter_irqson(void)
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check to see if any future non-offloaded RCU-related work will need
|
||||||
|
* to be done by the current CPU, even if none need be done immediately,
|
||||||
|
* returning 1 if so. This function is part of the RCU implementation;
|
||||||
|
* it is -not- an exported member of the RCU API. This is used by
|
||||||
|
* the idle-entry code to figure out whether it is safe to disable the
|
||||||
|
* scheduler-clock interrupt.
|
||||||
|
*
|
||||||
|
* Just check whether or not this CPU has non-offloaded RCU callbacks
|
||||||
|
* queued.
|
||||||
|
*/
|
||||||
|
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
|
||||||
|
{
|
||||||
|
*nextevt = KTIME_MAX;
|
||||||
|
return !rcu_segcblist_empty(&this_cpu_ptr(&rcu_data)->cblist) &&
|
||||||
|
!rcu_rdp_is_offloaded(this_cpu_ptr(&rcu_data));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If any sort of urgency was applied to the current CPU (for example,
|
* If any sort of urgency was applied to the current CPU (for example,
|
||||||
* the scheduler-clock interrupt was enabled on a nohz_full CPU) in order
|
* the scheduler-clock interrupt was enabled on a nohz_full CPU) in order
|
||||||
|
|
|
@ -1251,22 +1251,6 @@ static void __init rcu_spawn_boost_kthreads(void)
|
||||||
|
|
||||||
#endif /* #else #ifdef CONFIG_RCU_BOOST */
|
#endif /* #else #ifdef CONFIG_RCU_BOOST */
|
||||||
|
|
||||||
/*
|
|
||||||
* Check to see if any future non-offloaded RCU-related work will need
|
|
||||||
* to be done by the current CPU, even if none need be done immediately,
|
|
||||||
* returning 1 if so. This function is part of the RCU implementation;
|
|
||||||
* it is -not- an exported member of the RCU API.
|
|
||||||
*
|
|
||||||
* Just check whether or not this CPU has non-offloaded RCU callbacks
|
|
||||||
* queued.
|
|
||||||
*/
|
|
||||||
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
|
|
||||||
{
|
|
||||||
*nextevt = KTIME_MAX;
|
|
||||||
return !rcu_segcblist_empty(&this_cpu_ptr(&rcu_data)->cblist) &&
|
|
||||||
!rcu_rdp_is_offloaded(this_cpu_ptr(&rcu_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Is this CPU a NO_HZ_FULL CPU that should ignore RCU so that the
|
* Is this CPU a NO_HZ_FULL CPU that should ignore RCU so that the
|
||||||
* grace-period kthread will do force_quiescent_state() processing?
|
* grace-period kthread will do force_quiescent_state() processing?
|
||||||
|
|
Loading…
Reference in a new issue