Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

context_tracking: Remove rcu_task_trace_heavyweight_{enter,exit}()

Because SRCU-fast does not use IPIs for its grace periods, there is
no need for real-time workloads to switch to an IPI-free mode, and
there is in turn no need for either rcu_task_trace_heavyweight_enter()
or rcu_task_trace_heavyweight_exit(). This commit therefore removes them.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: bpf@vger.kernel.org
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>

authored by

Paul E. McKenney and committed by
Boqun Feng
46e32359 c27cea44

-20
-20
kernel/context_tracking.c
··· 54 54 #endif /* #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL) */ 55 55 } 56 56 57 - /* Turn on heavyweight RCU tasks trace readers on kernel exit. */ 58 - static __always_inline void rcu_task_trace_heavyweight_enter(void) 59 - { 60 - #ifdef CONFIG_TASKS_TRACE_RCU 61 - if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB)) 62 - current->trc_reader_special.b.need_mb = true; 63 - #endif /* #ifdef CONFIG_TASKS_TRACE_RCU */ 64 - } 65 - 66 - /* Turn off heavyweight RCU tasks trace readers on kernel entry. */ 67 - static __always_inline void rcu_task_trace_heavyweight_exit(void) 68 - { 69 - #ifdef CONFIG_TASKS_TRACE_RCU 70 - if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB)) 71 - current->trc_reader_special.b.need_mb = false; 72 - #endif /* #ifdef CONFIG_TASKS_TRACE_RCU */ 73 - } 74 - 75 57 /* 76 58 * Record entry into an extended quiescent state. This is only to be 77 59 * called when not already in an extended quiescent state, that is, ··· 67 85 * critical sections, and we also must force ordering with the 68 86 * next idle sojourn. 69 87 */ 70 - rcu_task_trace_heavyweight_enter(); // Before CT state update! 71 88 // RCU is still watching. Better not be in extended quiescent state! 72 89 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !rcu_is_watching_curr_cpu()); 73 90 (void)ct_state_inc(offset); ··· 89 108 */ 90 109 seq = ct_state_inc(offset); 91 110 // RCU is now watching. Better not be in an extended quiescent state! 92 - rcu_task_trace_heavyweight_exit(); // After CT state update! 93 111 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !(seq & CT_RCU_WATCHING)); 94 112 } 95 113