3 ms·
> To mitigate this we can use locks around the statements that update the counters. However, these locks are expensive and we’ve been hesitant to place locks ar
by cespare 13y ago
> To mitigate this we can use locks around the statements that update the counters. However, these locks are expensive and we’ve been hesitant to place locks around all the counters just to make sure they are accurate. Performance over accurate statistics, right?
Does this mean the Varnish authors have intentional data races all over the codebase? Can't the compiler do whatever it wants in these cases (because it's undefined behavior)? Can't this completely blow up?
http://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong http://software.intel.com/en-us/blogs/2013/01/06/benign-data...
Edit: I'm not an expert on this stuff so I'm probably wrong -- maybe someone can tell me what I'm missing.
- damienkatz 13y agoI believe it's only for stats, which means the stats might not be accurate, but shouldn't affect the proper functioning of code (assuming nothing relies on stats being accurate).
- colanderman 13y agoNot just the compiler, the processor can do whatever it wants.