Skip to content

Commit 3f4ca20

Browse files
Yipeng Zoupaulmckrcu
Yipeng Zou
authored andcommitted
rcu: Remove rcu_is_idle_cpu()
The commit 3fcd6a2 ("x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs") introduced rcu_is_idle_cpu() in order to identify the current CPU idle state. But commit f3eca38 ("x86/aperfmperf: Replace arch_freq_get_on_cpu()") switched to using MAX_SAMPLE_AGE, so rcu_is_idle_cpu() is no longer used. This commit therefore removes it. Fixes: f3eca38 ("x86/aperfmperf: Replace arch_freq_get_on_cpu()") Signed-off-by: Yipeng Zou <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 6f05cad commit 3f4ca20

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

include/linux/rcutiny.h

-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ static inline void rcu_virt_note_context_switch(void) { }
146146
static inline void rcu_cpu_stall_reset(void) { }
147147
static inline int rcu_jiffies_till_stall_check(void) { return 21 * HZ; }
148148
static inline void rcu_irq_exit_check_preempt(void) { }
149-
#define rcu_is_idle_cpu(cpu) \
150-
(is_idle_task(current) && !in_nmi() && !in_hardirq() && !in_serving_softirq())
151149
static inline void exit_rcu(void) { }
152150
static inline bool rcu_preempt_need_deferred_qs(struct task_struct *t)
153151
{

include/linux/rcutree.h

-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ bool poll_state_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp);
8787
void cond_synchronize_rcu(unsigned long oldstate);
8888
void cond_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp);
8989

90-
bool rcu_is_idle_cpu(int cpu);
91-
9290
#ifdef CONFIG_PROVE_RCU
9391
void rcu_irq_exit_check_preempt(void);
9492
#else

kernel/rcu/tree.c

-6
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,6 @@ static bool rcu_dynticks_in_eqs(int snap)
301301
return !(snap & RCU_DYNTICKS_IDX);
302302
}
303303

304-
/* Return true if the specified CPU is currently idle from an RCU viewpoint. */
305-
bool rcu_is_idle_cpu(int cpu)
306-
{
307-
return rcu_dynticks_in_eqs(rcu_dynticks_snap(cpu));
308-
}
309-
310304
/*
311305
* Return true if the CPU corresponding to the specified rcu_data
312306
* structure has spent some time in an extended quiescent state since

0 commit comments

Comments
 (0)