Hazard pointers
Hazard pointers
Posted Oct 1, 2024 19:48 UTC (Tue) by jseigh (guest, #173778)In reply to: Hazard pointers by PaulMcKenney
Parent article: The RCU API, 2024 edition
Asymmetric memory barriers, that are used to eliminate the need for the expensive memory barrier in a hazard pointer read, look for events on the other processors which would constitute a memory barrier on the other processors. Examples would be context switches, cpu in a wait state, and ipi interrupt handling. The former 2 being used as quiescent states by RCU (if I'm guessing correctly), hence the use of RCU in an asymmetric memory barrier implementation. A vcpu wait state would also constitute a memory barrier, so if they were observable, they to could be used to avoid vcpu preemption issues in a asymmetric memory barrier implementation.
vcpu wait state detection should also be used for IPI implementations since the IPI's are also affected by vcpu preemption.