Skip to content

Commit ae91aa0

Browse files
committed
rcu: Remove debugfs tracing
RCU's debugfs tracing used to be the only reasonable low-level debug information available, but ftrace and event tracing has since surpassed the RCU debugfs level of usefulness. This commit therefore removes RCU's debugfs tracing. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent bd8cc5a commit ae91aa0

13 files changed

Lines changed: 4 additions & 1192 deletions

File tree

‎Documentation/RCU/00-INDEX‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ stallwarn.txt
2828
- RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress)
2929
torture.txt
3030
- RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
31-
trace.txt
32-
- CONFIG_RCU_TRACE debugfs files and formats
3331
UP.txt
3432
- RCU on Uniprocessor Systems
3533
whatisRCU.txt

‎Documentation/RCU/Design/Requirements/Requirements.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ <h2><a name="Software-Engineering Requirements">
20342034
some other synchronization mechanism, for example, reference
20352035
counting.
20362036
<li> In kernels built with <tt>CONFIG_RCU_TRACE=y</tt>, RCU-related
2037-
information is provided via both debugfs and event tracing.
2037+
information is provided via event tracing.
20382038
<li> Open-coded use of <tt>rcu_assign_pointer()</tt> and
20392039
<tt>rcu_dereference()</tt> to create typical linked
20402040
data structures can be surprisingly error-prone.

‎Documentation/RCU/trace.txt‎

Lines changed: 0 additions & 535 deletions
This file was deleted.

‎init/Kconfig‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -659,14 +659,6 @@ config RCU_FAST_NO_HZ
659659

660660
Say N if you are unsure.
661661

662-
config TREE_RCU_TRACE
663-
def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU )
664-
select DEBUG_FS
665-
help
666-
This option provides tracing for the TREE_RCU and
667-
PREEMPT_RCU implementations, permitting Makefile to
668-
trivially select kernel/rcutree_trace.c.
669-
670662
config RCU_BOOST
671663
bool "Enable RCU priority boosting"
672664
depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT

‎kernel/rcu/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
99
obj-$(CONFIG_RCU_PERF_TEST) += rcuperf.o
1010
obj-$(CONFIG_TREE_RCU) += tree.o
1111
obj-$(CONFIG_PREEMPT_RCU) += tree.o
12-
obj-$(CONFIG_TREE_RCU_TRACE) += tree_trace.o
1312
obj-$(CONFIG_TINY_RCU) += tiny.o
1413
obj-$(CONFIG_RCU_NEED_SEGCBLIST) += rcu_segcblist.o

‎kernel/rcu/tiny_plugin.h‎

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
#include <linux/kthread.h>
2626
#include <linux/init.h>
27-
#include <linux/debugfs.h>
28-
#include <linux/seq_file.h>
2927

3028
/* Global control variables for rcupdate callback mechanism. */
3129
struct rcu_ctrlblk {
@@ -87,49 +85,6 @@ static void rcu_trace_sub_qlen(struct rcu_ctrlblk *rcp, int n)
8785
local_irq_restore(flags);
8886
}
8987

90-
/*
91-
* Dump statistics for TINY_RCU, such as they are.
92-
*/
93-
static int show_tiny_stats(struct seq_file *m, void *unused)
94-
{
95-
seq_printf(m, "rcu_sched: qlen: %ld\n", rcu_sched_ctrlblk.qlen);
96-
seq_printf(m, "rcu_bh: qlen: %ld\n", rcu_bh_ctrlblk.qlen);
97-
return 0;
98-
}
99-
100-
static int show_tiny_stats_open(struct inode *inode, struct file *file)
101-
{
102-
return single_open(file, show_tiny_stats, NULL);
103-
}
104-
105-
static const struct file_operations show_tiny_stats_fops = {
106-
.owner = THIS_MODULE,
107-
.open = show_tiny_stats_open,
108-
.read = seq_read,
109-
.llseek = seq_lseek,
110-
.release = single_release,
111-
};
112-
113-
static struct dentry *rcudir;
114-
115-
static int __init rcutiny_trace_init(void)
116-
{
117-
struct dentry *retval;
118-
119-
rcudir = debugfs_create_dir("rcu", NULL);
120-
if (!rcudir)
121-
goto free_out;
122-
retval = debugfs_create_file("rcudata", 0444, rcudir,
123-
NULL, &show_tiny_stats_fops);
124-
if (!retval)
125-
goto free_out;
126-
return 0;
127-
free_out:
128-
debugfs_remove_recursive(rcudir);
129-
return 1;
130-
}
131-
device_initcall(rcutiny_trace_init);
132-
13388
static void check_cpu_stall(struct rcu_ctrlblk *rcp)
13489
{
13590
unsigned long j;

‎kernel/rcu/tree.h‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,6 @@ struct rcu_node {
152152
/* Number of tasks boosted for expedited GP. */
153153
unsigned long n_normal_boosts;
154154
/* Number of tasks boosted for normal GP. */
155-
unsigned long n_balk_blkd_tasks;
156-
/* Refused to boost: no blocked tasks. */
157-
unsigned long n_balk_exp_gp_tasks;
158-
/* Refused to boost: nothing blocking GP. */
159-
unsigned long n_balk_boost_tasks;
160-
/* Refused to boost: already boosting. */
161-
unsigned long n_balk_notblocked;
162-
/* Refused to boost: RCU RS CS still running. */
163-
unsigned long n_balk_notyet;
164-
/* Refused to boost: not yet time. */
165-
unsigned long n_balk_nos;
166-
/* Refused to boost: not sure why, though. */
167-
/* This can happen due to race conditions. */
168155
#ifdef CONFIG_RCU_NOCB_CPU
169156
struct swait_queue_head nocb_gp_wq[2];
170157
/* Place for rcu_nocb_kthread() to wait GP. */
@@ -535,17 +522,3 @@ void srcu_offline_cpu(unsigned int cpu) { }
535522
#endif /* #else #ifdef CONFIG_SRCU */
536523

537524
#endif /* #ifndef RCU_TREE_NONCORE */
538-
539-
#ifdef CONFIG_RCU_TRACE
540-
/* Read out queue lengths for tracing. */
541-
static inline void rcu_nocb_q_lengths(struct rcu_data *rdp, long *ql, long *qll)
542-
{
543-
#ifdef CONFIG_RCU_NOCB_CPU
544-
*ql = atomic_long_read(&rdp->nocb_q_count);
545-
*qll = atomic_long_read(&rdp->nocb_q_count_lazy);
546-
#else /* #ifdef CONFIG_RCU_NOCB_CPU */
547-
*ql = 0;
548-
*qll = 0;
549-
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
550-
}
551-
#endif /* #ifdef CONFIG_RCU_TRACE */

‎kernel/rcu/tree_plugin.h‎

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static bool __read_mostly rcu_nocb_poll; /* Offload kthread are to poll. */
7070
static void __init rcu_bootup_announce_oddness(void)
7171
{
7272
if (IS_ENABLED(CONFIG_RCU_TRACE))
73-
pr_info("\tRCU debugfs-based tracing is enabled.\n");
73+
pr_info("\tRCU event tracing is enabled.\n");
7474
if ((IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 64) ||
7575
(!IS_ENABLED(CONFIG_64BIT) && RCU_FANOUT != 32))
7676
pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n",
@@ -899,33 +899,6 @@ void exit_rcu(void)
899899

900900
#include "../locking/rtmutex_common.h"
901901

902-
#ifdef CONFIG_RCU_TRACE
903-
904-
static void rcu_initiate_boost_trace(struct rcu_node *rnp)
905-
{
906-
if (!rcu_preempt_has_tasks(rnp))
907-
rnp->n_balk_blkd_tasks++;
908-
else if (rnp->exp_tasks == NULL && rnp->gp_tasks == NULL)
909-
rnp->n_balk_exp_gp_tasks++;
910-
else if (rnp->gp_tasks != NULL && rnp->boost_tasks != NULL)
911-
rnp->n_balk_boost_tasks++;
912-
else if (rnp->gp_tasks != NULL && rnp->qsmask != 0)
913-
rnp->n_balk_notblocked++;
914-
else if (rnp->gp_tasks != NULL &&
915-
ULONG_CMP_LT(jiffies, rnp->boost_time))
916-
rnp->n_balk_notyet++;
917-
else
918-
rnp->n_balk_nos++;
919-
}
920-
921-
#else /* #ifdef CONFIG_RCU_TRACE */
922-
923-
static void rcu_initiate_boost_trace(struct rcu_node *rnp)
924-
{
925-
}
926-
927-
#endif /* #else #ifdef CONFIG_RCU_TRACE */
928-
929902
static void rcu_wake_cond(struct task_struct *t, int status)
930903
{
931904
/*
@@ -1058,7 +1031,6 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
10581031

10591032
lockdep_assert_held(&rnp->lock);
10601033
if (!rcu_preempt_blocked_readers_cgp(rnp) && rnp->exp_tasks == NULL) {
1061-
rnp->n_balk_exp_gp_tasks++;
10621034
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
10631035
return;
10641036
}
@@ -1074,7 +1046,6 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
10741046
if (t)
10751047
rcu_wake_cond(t, rnp->boost_kthread_status);
10761048
} else {
1077-
rcu_initiate_boost_trace(rnp);
10781049
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
10791050
}
10801051
}

0 commit comments

Comments
 (0)