Print this page
12771 11909 re-introduced lockstat panic

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/ia32/ml/lock_prim.s
          +++ new/usr/src/uts/intel/ia32/ml/lock_prim.s
↓ open down ↓ 486 lines elided ↑ open up ↑
 487  487          movq    (%rdi), %rax                    /* rax = old rw_wwwh value */
 488  488          cmpl    $RW_READ_LOCK, %eax             /* single-reader, no waiters? */
 489  489          jne     .rw_not_single_reader
 490  490          xorl    %edx, %edx                      /* rdx = new value (unheld) */
 491  491  .rw_read_exit:
 492  492          lock
 493  493          cmpxchgq %rdx, (%rdi)                   /* try to drop read lock */
 494  494          jnz     rw_exit_wakeup
 495  495  .rw_read_exit_lockstat_patch_point:
 496  496          ret
      497 +        movq    %gs:CPU_THREAD, %rcx            /* rcx = thread ptr */
 497  498          movq    %rdi, %rsi                      /* rsi = lock ptr */
 498  499          movl    $LS_RW_EXIT_RELEASE, %edi
 499  500          movl    $RW_READER, %edx
 500  501          jmp     lockstat_wrapper_arg
 501  502  .rw_not_single_reader:
 502  503          testl   $RW_WRITE_LOCKED, %eax  /* write-locked or write-wanted? */
 503  504          jnz     .rw_write_exit
 504  505          leaq    -RW_READ_LOCK(%rax), %rdx       /* rdx = new value */
 505  506          cmpl    $RW_READ_LOCK, %edx
 506  507          jge     .rw_read_exit           /* not last reader, safe to drop */
↓ open down ↓ 207 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX