You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rcu: a per-table choice between RCU and SRCU for the walk, decided by a number #1184
rcu.map walks inside an SRCU read-side critical section since #1179, so its callback may sleep and every entry a writer unlinks goes through call_srcu before kfree_rcu. Measured on the shared host (aarch64, three runs of a million operations each, minimum ns per operation, with a spread between runs of 110 to 172 on master alone): a replace costs 110 on master and 113 on #1179, an insert and remove pair 134 and 145, and a walk 164 and 146 per key visited. The difference between call_srcu and kfree_rcu on the writer sits inside the noise, the walk got cheaper, and lookups are untouched. Not measured: memory in flight, since an unlinked entry now lives an SRCU grace period, tens of ms, plus an RCU one, instead of one.
A table walked only from interrupt-context runtimes, whose callback cannot sleep anyway, could keep the walk under rcu_read_lock and free with kfree_rcu alone. The choice is per table and not per call, since the writer decides how it frees, and it costs a flag at creation, two walk paths, a refusal of the sleeping walker and its documentation; the tables written hot in the tree, systrack's, are walked from process context and would stay SRCU. Not done now: open it when a consumer shows a hot-writer table walked only from hooks, with that table's number in hand.
Activity