On Wed, May 25, 2016 at 01:17:21 +0300, Sergey Fedorov wrote: > >> With this implementation we could: > >> (1) get rid of qht_map::stale > >> (2) don't waste cycles waiting for resize to complete > > I'll include this in v6. > > How is it by perf?
Not much of a difference, since resize is a slow path. Calling qht-bench with lots of update and resize threads performs very poorly either way =D I like the change though because using the mutex here simplifies the resize code; there's no guilt anymore attached to holding the lock for some time (e.g. when allocating a new, possible quite large, map), whereas with the spinlock we would allocate it before acquiring the lock, without knowing whether the allocation would be needed in the end. Emilio