On 7/19/2024 9:26 AM, Bonita Montero wrote:
[...]
outside: 19937
inside: 20030 100.471%
Result: locking from inside and outside is as efficient with
Linux and glibc, only half a percent more contextswitches
with locking from inside.
Well, wait morphing should have something to do with it. ;^)
Generally, signalling a condvar while the mutex is locked is not all
that efficient...
Am 19.07.2024 um 21:05 schrieb Scott Lurndal:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:Show me the code that shows a difference.
On 7/19/2024 9:26 AM, Bonita Montero wrote:
[...]
outside: 19937
inside: 20030 100.471%
Result: locking from inside and outside is as efficient with
Linux and glibc, only half a percent more contextswitches
with locking from inside.
Well, wait morphing should have something to do with it. ;^)
Generally, signalling a condvar while the mutex is locked is not all
that efficient...
One cannot draw any conclusions from that toy example. ...
Generally, signalling a condvar while the mutex is locked is not all
that efficient...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 188:39:22 |
Calls: | 9,707 |
Calls today: | 2 |
Files: | 13,738 |
Messages: | 6,179,811 |