History

rcu: Refactor rcu_barrier() empty-list handling

This commit saves a few lines by checking first for an empty callback list. If the callback list is empty, then that CPU is taken care of, regardless of its online or nocb state. Also simplify tracing accordingly and fold a few lines together.

Paul E. McKenney committed 4 years ago

Commit 0cabb471 parent 82980b12 files · +12 −22Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/trace/events/rcu.h+4−5
@@ -794,16 +794,15 @@ TRACE_EVENT_RCU(rcu_torture_read, · 793 unmodified lines
794794 * Tracepoint for rcu_barrier() execution. The string "s" describes
795795 * the rcu_barrier phase:
796796 * "Begin": rcu_barrier() started.
797+ * "CB": An rcu_barrier_callback() invoked a callback, not the last.
797798 * "EarlyExit": rcu_barrier() piggybacked, thus early exit.
798799 * "Inc1": rcu_barrier() piggyback check counter incremented.
799− * "OfflineNoCBQ": rcu_barrier() found offline no-CBs CPU with callbacks.
800− * "OnlineQ": rcu_barrier() found online CPU with callbacks.
801− * "OnlineNQ": rcu_barrier() found online CPU, no callbacks.
800+ * "Inc2": rcu_barrier() piggyback check counter incremented.
802801 * "IRQ": An rcu_barrier_callback() callback posted on remote CPU.
803802 * "IRQNQ": An rcu_barrier_callback() callback found no callbacks.
804− * "CB": An rcu_barrier_callback() invoked a callback, not the last.
805803 * "LastCB": An rcu_barrier_callback() invoked the last callback.
806− * "Inc2": rcu_barrier() piggyback check counter incremented.
804+ * "NQ": rcu_barrier() found a CPU with no callbacks.
805+ * "OnlineQ": rcu_barrier() found online CPU with callbacks.
807806 * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument
808807 * is the count of remaining callbacks, and "done" is the piggybacking count.
809808 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t