1. 14 8月, 2007 2 次提交
    • A
      [IA64] Use atomic64_read to read an atomic64_t. · 6cba9862
      Andreas Schwab 提交于
      The routines ia64_atomic64_{add,sub} mistakenly use
      atomic_read() to grab the old value instead of using
      atomic64_read().
      Signed-off-by: NAndreas Schwab <schwab@suse.de>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      6cba9862
    • D
      [IA64] disable irq's and check need_resched before safe_halt · 71416bea
      Dimitri Sivanich 提交于
      While sending interrupts to a cpu to repeatedly wake a thread, on occasion
      that thread will take a full timer tick cycle (4002 usec in my case)
      to wakeup.
      
      The problem concerns a race condition in the code around the safe_halt()
      call in the default_idle() routine.  Setting 'nohalt' on the kernel
      command line causes the long wakeups to disappear.
      
      void
      default_idle (void)
      {
              local_irq_enable();
              while (!need_resched()) {
      -->             if (can_do_pal_halt)
      -->                     safe_halt();
                      else
      
      A timer tick could arrive between the check for !need_resched and the
      actual call to safe_halt() (which does a pal call to PAL_HALT_LIGHT).
      By the time the timer tick completes, a thread that might now need to run
      could get held up for as long as a timer tick waiting for the halted cpu.
      
      I'm proposing that we disable irq's and check need_resched again before
      calling safe_halt().  Does anyone see any problem with this approach?
      Signed-off-by: NDimitri Sivanich <sivanich@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      71416bea
  2. 13 8月, 2007 8 次提交
  3. 12 8月, 2007 30 次提交