...files
that use epoch_enter/exit extensively, Clang would create non-inlined
functions. Resulting kernel will have several instances of
epoch_enter/exit.
Performance win for inlining is speculative. At the same time we can
speculate that inlining will bloat size of kernel text, resulting in
worse instruction cache hit ratio. Unless properly measured inlining
shouldn't be used by default.
Once uninlined, epoch can use regular thread KPI.
Second, the dualism between epoch_tracker and epoch_thread is fragile
and unnecessary. So, expose CK types to kernel and use a single normal
structure for epoch_tracker.
However, the type hiding structure for epoch_context_t seems inevitable,
for now, unless CK is exposed to userland, which is undesired.
There is one functional change in the review, decribed below.
Placing epoch_tracker in a structure is a very unsafe thing to do, so
for the sake of compat KPI like if_addr_rlock, use a thread private
tracker. This makes compat KPU functions re-entrable, and epoch_tracker
not exposed to userland.
The review isn't supposed to be committed as single commit. It is divided
into several commits, that can be viewed here: