-
Andrei Elkin authored
It was observed that on some platforms like Solaris x86 MTS applies events slow. The reason appears to be in that when Coordinator thread is sluggish for some reason it could enter a napping routine while the Worker actually has very little to do. Meanwhile low-running Worker can empty its assignment queue to get starving. So more to the waste of time with sleeping, at awakening Coordinator had to signal the Worker about the first assignement in the queue. In contrast, the idea of the napping routine was to minimize signalling. Fixed with restricting conditions to enter napping block. Effectivly scheduling to about to become hungry Worker won't be delayed. As a side effect, integer overflow in diff_timespec() of include/my_pthread.h is eliminated as well.
Andrei Elkin authoredIt was observed that on some platforms like Solaris x86 MTS applies events slow. The reason appears to be in that when Coordinator thread is sluggish for some reason it could enter a napping routine while the Worker actually has very little to do. Meanwhile low-running Worker can empty its assignment queue to get starving. So more to the waste of time with sleeping, at awakening Coordinator had to signal the Worker about the first assignement in the queue. In contrast, the idea of the napping routine was to minimize signalling. Fixed with restricting conditions to enter napping block. Effectivly scheduling to about to become hungry Worker won't be delayed. As a side effect, integer overflow in diff_timespec() of include/my_pthread.h is eliminated as well.
Loading