[Bug 195098] pthread lock performance degradation on single CPU VM
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Dec 4 19:37:11 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195098
--- Comment #3 from Ed Maste <emaste at freebsd.org> ---
It appears that in the "slow" case the repro code is spinning in the
pthread_yield() at line 107 - i.e., trying to allow the contender threads run,
but the main thread immediately resumes.
98 /* Wait until every thread is ready. */
99 dbgprintf ("Main thread before synchronizing for round %d\n",
repeat);
100 for (;;)
101 {
102 int ready_count = 0;
103 for (i = 0; i < THREAD_COUNT; i++)
104 ready_count += ready[i];
105 if (ready_count == THREAD_COUNT)
106 break;
107 pthread_yield ();
108 }
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-threads
mailing list