History

rcu/nocb: Comment the reason behind BH disablement on batch processing

This commit explains why softirqs need to be disabled while invoking callbacks, even when callback processing has been offloaded. After all, invoking callbacks concurrently is one thing, but concurrently invoking the same callback is quite another.

Frederic Weisbecker committed 5 years ago

Commit 5de2e5b1 parent 3820b511 file · +6 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/rcu/tree_plugin.h+6−0
@@ -2235,6 +2235,12 @@ static void nocb_cb_wait(struct rcu_data *rdp) · 2234 unmodified lines
22352235 local_irq_save(flags);
22362236 rcu_momentary_dyntick_idle();
22372237 local_irq_restore(flags);
2238+ /*
2239+ * Disable BH to provide the expected environment. Also, when
2240+ * transitioning to/from NOCB mode, a self-requeuing callback might
2241+ * be invoked from softirq. A short grace period could cause both
2242+ * instances of this callback would execute concurrently.
2243+ */
22382244 local_bh_disable();
22392245 rcu_do_batch(rdp);
22402246 local_bh_enable();

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