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: | 547 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:20:23 |
Calls: | 10,398 |
Calls today: | 6 |
Files: | 14,067 |
Messages: | 6,417,476 |
Posted today: | 1 |