Skip to content

Commit 26ff1fb

Browse files
paulmckrcuFrederic Weisbecker
authored andcommitted
rcu: Delete unused rcu_gp_might_be_stalled() function
The rcu_gp_might_be_stalled() function is no longer used, so this commit removes it. Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent f7345cc commit 26ff1fb

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

include/linux/rcutiny.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ static inline bool rcu_inkernel_boot_has_ended(void) { return true; }
165165
static inline bool rcu_is_watching(void) { return true; }
166166
static inline void rcu_momentary_eqs(void) { }
167167
static inline void kfree_rcu_scheduler_running(void) { }
168-
static inline bool rcu_gp_might_be_stalled(void) { return false; }
169168

170169
/* Avoid RCU read-side critical sections leaking across. */
171170
static inline void rcu_all_qs(void) { barrier(); }

include/linux/rcutree.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void kvfree_rcu_barrier(void);
4040
void rcu_barrier(void);
4141
void rcu_momentary_eqs(void);
4242
void kfree_rcu_scheduler_running(void);
43-
bool rcu_gp_might_be_stalled(void);
4443

4544
struct rcu_gp_oldstate {
4645
unsigned long rgos_norm;

kernel/rcu/tree_stall.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,6 @@ int rcu_jiffies_till_stall_check(void)
7676
}
7777
EXPORT_SYMBOL_GPL(rcu_jiffies_till_stall_check);
7878

79-
/**
80-
* rcu_gp_might_be_stalled - Is it likely that the grace period is stalled?
81-
*
82-
* Returns @true if the current grace period is sufficiently old that
83-
* it is reasonable to assume that it might be stalled. This can be
84-
* useful when deciding whether to allocate memory to enable RCU-mediated
85-
* freeing on the one hand or just invoking synchronize_rcu() on the other.
86-
* The latter is preferable when the grace period is stalled.
87-
*
88-
* Note that sampling of the .gp_start and .gp_seq fields must be done
89-
* carefully to avoid false positives at the beginnings and ends of
90-
* grace periods.
91-
*/
92-
bool rcu_gp_might_be_stalled(void)
93-
{
94-
unsigned long d = rcu_jiffies_till_stall_check() / RCU_STALL_MIGHT_DIV;
95-
unsigned long j = jiffies;
96-
97-
if (d < RCU_STALL_MIGHT_MIN)
98-
d = RCU_STALL_MIGHT_MIN;
99-
smp_mb(); // jiffies before .gp_seq to avoid false positives.
100-
if (!rcu_gp_in_progress())
101-
return false;
102-
// Long delays at this point avoids false positive, but a delay
103-
// of ULONG_MAX/4 jiffies voids your no-false-positive warranty.
104-
smp_mb(); // .gp_seq before second .gp_start
105-
// And ditto here.
106-
return !time_before(j, READ_ONCE(rcu_state.gp_start) + d);
107-
}
108-
10979
/* Don't do RCU CPU stall warnings during long sysrq printouts. */
11080
void rcu_sysrq_start(void)
11181
{

0 commit comments

Comments
 (0)