mjg 2eae2c18c9 sx: port over writer starvation prevention measures from rwlock
A constant stream of readers could completely starve writers and this is not
a hypothetical scenario.

The 'poll2_threads' test from the will-it-scale suite reliably starves writers
even with concurrency < 10 threads.

The problem was run into and diagnosed by dillon@backplane.com

There was next to no change in lock contention profile during -j 128 pkg build,
despite an sx lock being at the top.

Tested by:	pho
2018-05-22 07:20:22 +00:00
..
2018-04-13 20:30:49 +00:00
2018-05-19 07:04:43 +00:00
2018-05-06 00:19:48 +00:00
2018-03-20 15:51:05 +00:00
2018-05-22 07:16:39 +00:00
2018-05-19 03:55:42 +00:00
2018-05-04 22:48:10 +00:00
2018-05-07 23:36:16 +00:00
2018-05-07 23:36:16 +00:00
2018-04-08 16:34:10 +00:00
2018-05-19 03:49:36 +00:00
2018-05-10 13:19:42 +00:00
2018-05-19 03:56:39 +00:00
2018-03-27 15:20:03 +00:00
2018-05-19 04:10:53 +00:00
2018-05-20 21:37:34 +00:00
2018-05-20 04:45:05 +00:00