News for hackers. Stuff that matters.
Re:Optimizing a Ring Buffer for Throughput by gpderetta on Tuesday June 27, 2023 @07:11AM (#36491318)
Reading its own values is never a problem, the writeIndex cacheline will switch from E (or M) to S (or O), but it is never evicted, so reads from it never miss. For frequent writes the read will be fulfilled by the store buffer anyway.
Re:Optimizing a Ring Buffer for Throughput by rigtorp on Tuesday June 27, 2023 @08:59AM (#36492105)
I think it will be invalidated due to RFO when the reader reads the write index. Only when multiple readers reads the same cache line without any intervening write will the RFO heuristic be disabled.