1. 2008年 10月 15日 4 次提交
  2. 2008年 10月 13日 4 次提交
  3. 2008年 10月 09日 1 次提交
  4. 2008年 9月 28日 1 次提交
  5. 2008年 9月 25日 1 次提交
  6. 2008年 9月 24日 1 次提交
  7. 2008年 9月 11日 2 次提交
  8. 2008年 9月 09日 1 次提交
  9. 2008年 9月 03日 4 次提交
  10. 2008年 8月 29日 1 次提交
  11. 2008年 8月 28日 2 次提交
  12. 2008年 8月 22日 2 次提交
  13. 2008年 8月 21日 5 次提交
  14. 2007年 12月 21日 1 次提交
  15. 2007年 11月 29日 3 次提交
  16. 2007年 10月 21日 1 次提交
  17. 2007年 10月 12日 1 次提交
  18. 2007年 10月 02日 1 次提交
  19. 2007年 9月 30日 2 次提交
    • rsc's avatar
      Re: why cpuid() in locking code? · 9fd9f804
      rsc 提交于
      rtm wrote:
      > Why does acquire() call cpuid()? Why does release() call cpuid()?
      
      The cpuid in acquire is redundant with the cmpxchg, as you said.
      I have removed the cpuid from acquire.
      
      The cpuid in release is actually doing something important,
      but not on the hardware.  It keeps gcc from reordering the
      lock->locked assignment above the other two during optimization.
      (Not that current gcc -O2 would choose to do that, but it is allowed to.)
      I have replaced the cpuid in release with a "gcc barrier" that
      keeps gcc from moving things around but has no hardware effect.
      
      On a related note, I don't think the cpuid in mpmain is necessary,
      for the same reason that the cpuid wasn't needed in release.
      
      As to the question of whether
      
        acquire();
        x = protected;
        release();
      
      might read protected after release(), I still haven't convinced
      myself whether it can.  I'll put the cpuid back into release if
      we determine that it can.
      
      Russ
      9fd9f804
    • rsc's avatar
      tricks · c840f3ec
      rsc 提交于
      c840f3ec
  20. 2007年 9月 28日 2 次提交
    • rsc's avatar
      interrupts during system calls · af7366c9
      rsc 提交于
      "It just works."
      af7366c9
    • rsc's avatar
      Final word on the locking fiasco? · ab08960f
      rsc 提交于
      Change pushcli / popcli so that they can never turn on
      interrupts unexpectedly.  That is, if interrupts are on,
      then pushcli(); popcli(); turns them off and back on, but
      if they are off to begin with, then pushcli(); popcli(); is
      a no-op.
      
      I think our fundamental mistake was having a primitive
      (release and then popcli nee spllo) that could turn
      interrupts on at unexpected moments instead of being
      explicit about when we want to start allowing interrupts.
      
      With the new semantics, all the manual fiddling of ncli
      to force interrupts off in certain sections goes away.
      In return, we must explicitly mark the places where
      we want to enable interrupts unconditionally, by calling sti().
      There is only one: inside the scheduler loop.
      ab08960f