[ruby-cvs:71285] normal:r64193 (trunk): thread_pthread.c (native_sleep): reduce ppoll sleeps

normal at ruby-lang.org normal at ruby-lang.org
Sun Aug 5 17:56:53 JST 2018


normal	2018-08-05 17:56:52 +0900 (Sun, 05 Aug 2018)

  New Revision: 64193

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64193

  Log:
    thread_pthread.c (native_sleep): reduce ppoll sleeps
    
    By holding into sigwait_fd until after we acquire GVL, we can
    hit the faster native_cond_sleep path instead of ppoll when
    another thread wants to start sleeping.  ppoll-ing on sigwait_fd
    isn't really useful in program where GVL is contended
    
    This also allows reducing vm->gvl.lock mutex contention on
    waitpid sleep migrations.
    
                             r64170        this patch
    vm_thread_condvar1        0.921        1.356

  Modified files:
    trunk/thread_pthread.c


More information about the ruby-cvs mailing list