Skip to content
  • Takashi Kokubun's avatar
    d9d9005a
    MJIT: Stop using the VM barrier for jit_cont · d9d9005a
    Takashi Kokubun authored
    This solves multiple problems.
    
    First, RB_VM_LOCK_ENTER/LEAVE is a barrier. We could at least use the
    _NO_BARRIER variant.
    
    Second, this doesn't need to interfere with GC or other GVL users when
    multiple Ractors are used. This needs to be used in very few places, so
    the benefit of fine-grained locking would outweigh its small maintenance
    cost.
    
    Third, it fixes a crash for YJIT. Because YJIT is never disabled until a
    process exits unlike MJIT that finishes earlier, we could call jit_cont_free
    when EC no longer exists, which crashes RB_VM_LOCK_ENTER.
    d9d9005a
    MJIT: Stop using the VM barrier for jit_cont
    Takashi Kokubun authored
    This solves multiple problems.
    
    First, RB_VM_LOCK_ENTER/LEAVE is a barrier. We could at least use the
    _NO_BARRIER variant.
    
    Second, this doesn't need to interfere with GC or other GVL users when
    multiple Ractors are used. This needs to be used in very few places, so
    the benefit of fine-grained locking would outweigh its small maintenance
    cost.
    
    Third, it fixes a crash for YJIT. Because YJIT is never disabled until a
    process exits unlike MJIT that finishes earlier, we could call jit_cont_free
    when EC no longer exists, which crashes RB_VM_LOCK_ENTER.
Loading