the invl_gen_mtx is currently an expensive global serialization point on pmap_remove this converts it to use epoch
- passes pho's tests post epoch kpi change
Differential D15983
convert EBR like barrier to epoch(9) mmacy on Jun 23 2018, 11:10 PM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Portions of the network stack now execute within a preemptible epoch section. In particular, we're allocating from and freeing to UMA within these sections. This means that pmap_remove() might already be getting called within an epoch section for net_epoch. Because the td_epochq linkage is embedded in the thread struct rather than living on the stack (like we do for rmlocks), preemptible epochs don't compose, so I think this change as-is is fragile. Comment Actions More than fragile. https://people.freebsd.org/~pho/stress/log/mmacy025.txt Will fix when I get back. Comment Actions I want to read it (globally). I currently have some very time-consuming problems, so expect around a week turn-around time from me. Comment Actions But AFAICS you still cannot call epoch_wait() in an epoch section, which is the problem I'm referring to. Comment Actions You can't call epoch_wait(x) while in epoch x. In this case we're calling epoch_wait_preempt on pmap_epoch while inside of net_epoch_preempt. Except for a couple of teardown paths in in if.c epoch_wait is never called on net_epoch_preempt. Comment Actions epoch_wait_preempt() still asserts that td_epochnest == 0 though. And if you remove that constraint it becomes possible for concurrent epoch_wait()s to deadlock. Comment Actions Thanks, meant to remove that.
Possible in the general case. Not here. And yes, I have a WIP patch to add WITNESS support. Comment Actions And to address this particular issue, the assert can just be changed to MPASS(!in_epoch(x)) now that in_epoch takes an argument.
|