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
2235 local_irq_save(flags);2235 local_irq_save(flags);
2236 rcu_momentary_dyntick_idle();2236 rcu_momentary_dyntick_idle();
2237 local_irq_restore(flags);2237 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 */
2238 local_bh_disable();2244 local_bh_disable();
2239 rcu_do_batch(rdp);2245 rcu_do_batch(rdp);
2240 local_bh_enable();2246 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