KS2011: Preemption disable and verifiable APIs
KS2011: Preemption disable and verifiable APIs
Posted Oct 26, 2011 8:39 UTC (Wed) by etienne (guest, #25256)In reply to: KS2011: Preemption disable and verifiable APIs by valyala
Parent article: KS2011: Preemption disable and verifiable APIs
Most of the time the processor will not be changed, so you get the speed, but anyway the code is always right, just in some rare cases slower.
Posted Oct 26, 2011 16:56 UTC (Wed)
by valyala (guest, #41196)
[Link]
KS2011: Preemption disable and verifiable APIs
This won't work if you are going to modify the per-cpu structure after the CPU has been changed. So you'll end up with either locking or atomic modifications for the structure. But since most of the time the structure is modified via native CPU, both locking and atomic modifications should be fast, because there is no cache line bouncing.