3 ms·
That is because you do not need to clear the field at the end of a critical section. It contains the contiguous instruction range where it fires so there is no
by Veserv 14d ago
That is because you do not need to clear the field at the end of a critical section. It contains the contiguous instruction range where it fires so there is no problem with leaving it active forever unless you have another critical section where you want to use it.
No explicit memory barrier is required anywhere as the value is only read in supervisor mode and a privilege switch implicitly issues a LS-LS barrier on all major architectures. Even if you did not want to rely on that, you would only need a single S-LS barrier when you store the control structure the very first time.
- Someone 14d ago> That is because you do not need to clear the field at the end of a critical section. It contains the contiguous instruction range where it fires so there is no problem with leaving it active forever unless you have another critical section where you want to use it. Aha! So, to take advantage of that, a memory allocator uses the same abort handler for all operations?
- ckennelly 14d agoTCMalloc has different abort handlers for each function: If preempted, we need to know where to restart. If `rseq_cs` is no longer describing a relevant address, that is, the program counter has moved past it, the kernel just ignores it.