Skip to content
Snippets Groups Projects
  1. Oct 12, 2008
  2. Oct 08, 2008
  3. Sep 28, 2008
  4. Sep 24, 2008
  5. Sep 23, 2008
  6. Sep 11, 2008
  7. Sep 09, 2008
  8. Sep 03, 2008
  9. Sep 02, 2008
  10. Aug 28, 2008
  11. Aug 27, 2008
  12. Aug 21, 2008
  13. Aug 20, 2008
  14. Dec 20, 2007
  15. Nov 28, 2007
    • rsc's avatar
      fork minibug · c2258bf4
      rsc authored
      c2258bf4
    • rsc's avatar
      More complete lapic startup (thanks Silas) · 4f06ae0d
      rsc authored
      4f06ae0d
    • rsc's avatar
      · a6c4711a
      rsc authored
      bda[0xE] is a 16-bit segment number,
      not a real address.  So shift 4.
      
      Reported by Silas.
      
      Jim McKie says this code only matters
      on ancient EISA MP systems.
      a6c4711a
  16. Oct 20, 2007
  17. Oct 11, 2007
    • rsc's avatar
      · 949352af
      rsc authored
      Model verifying that wakeup really
      can be called after release without
      causing deadlock.
      949352af
  18. Oct 01, 2007
    • rsc's avatar
      · 943fd378
      rsc authored
      Incorporate new understanding of/with Intel SMP spec.
      
      Dropped cmpxchg in favor of xchg, to match lecture notes.
      
      Use xchg to release lock, for future protection and to
      keep gcc from acting clever.
      943fd378
  19. Sep 30, 2007
    • rsc's avatar
      · 9fd9f804
      rsc authored
      Re: why cpuid() in locking code?
      
      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 authored
      c840f3ec
  20. Sep 27, 2007
    • rsc's avatar
      · af7366c9
      rsc authored
      interrupts during system calls
      
      "It just works."
      af7366c9
    • rsc's avatar
      · ab08960f
      rsc authored
      Final word on the locking fiasco?
      
      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
    • rsc's avatar
      cleaner · f97f0d2b
      rsc authored
      f97f0d2b
    • rsc's avatar
      yank out stack overflow checking ugliness · c95bde81
      rsc authored
      c95bde81
    • rsc's avatar
      okay, that was long enough - revert · 4f74de0e
      rsc authored
      4f74de0e
    • rsc's avatar
      · ce2e7515
      rsc authored
      test: store curproc at top of stack
      
      I don't actually think this is worthwhile, but I figured
      I would check it in before reverting it, so that it can
      be in the revision history.
      
      Pros:
        * curproc doesn't need to turn on/off interrupts
        * scheduler doesn't have to edit curproc anymore
      
      Cons:
        * it's ugly
        * all the stack computation is more complicated.
        * it doesn't actually simplify anything but curproc,
          and even curproc is harder to follow.
      ce2e7515
Loading