1. 05 Feb, 2009 2 commits
    • Ingo Molnar's avatar
      Merge branch 'sched/urgent' into timers/urgent · 83895147
      Ingo Molnar authored
      Merging it here because an upcoming timers/urgent fix relies on
      a change already in sched/urgent and not yet upstream.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      83895147
    • Pavel Emelyanov's avatar
      x86: fix hpet timer reinit for x86_64 · a6a95406
      Pavel Emelyanov authored
      There's a small problem with hpet_rtc_reinit function - it checks
      for the:
      
      	hpet_readl(HPET_COUNTER) - hpet_t1_cmp > 0
      
      to continue increasing both the HPET_T1_CMP (register) and the
      hpet_t1_cmp (variable).
      
      But since the HPET_COUNTER is always 32-bit, if the hpet_t1_cmp
      is 64-bit this condition will always be FALSE once the latter hits
      the 32-bit boundary, and we can have a situation, when we don't
      increase the HPET_T1_CMP register high enough.
      
      The result - timer stops ticking, since HPET_T1_CMP becomes less,
      than the COUNTER and never increased again.
      
      The solution is (based on Linus's suggestion) to not compare 64-bits
      (on 64-bit x86), but to do the comparison on 32-bit signed
      integers.
      Reported-by: default avatarKirill Korotaev <dev@openvz.org>
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a6a95406
  2. 04 Feb, 2009 1 commit
    • Suresh Siddha's avatar
      sched: fix nohz load balancer on cpu offline · 483b4ee6
      Suresh Siddha authored
      Christian Borntraeger reports:
      
      > After a logical cpu offline, even on a complete idle system, there
      > is one cpu with full ticks. It turns out that nohz.cpu_mask has the
      > the offlined cpu still set.
      >
      > In select_nohz_load_balancer() we check if the system is completely
      > idle to turn of load balancing. We compare cpu_online_map with
      > nohz.cpu_mask.  Since cpu_online_map is updated on cpu unplug,
      > but nohz.cpu_mask is not, the check fails and the scheduler believes
      > that we need an "idle load balancer" even on a fully idle system.
      > Since the ilb cpu does not deactivate the timer tick this breaks NOHZ.
      
      Fix the select_nohz_load_balancer() to not set the nohz.cpu_mask
      while a cpu is going offline.
      Reported-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      483b4ee6
  3. 03 Feb, 2009 12 commits
  4. 02 Feb, 2009 23 commits
  5. 01 Feb, 2009 2 commits
    • Linus Torvalds's avatar
      Manually revert "mlock: downgrade mmap sem while populating mlocked regions" · 27421e21
      Linus Torvalds authored
      This essentially reverts commit 8edb08ca.
      
      It downgraded our mmap semaphore to a read-lock while mlocking pages, in
      order to allow other threads (and external accesses like "ps" et al) to
      walk the vma lists and take page faults etc.  Which is a nice idea, but
      the implementation does not work.
      
      Because we cannot upgrade the lock back to a write lock without
      releasing the mmap semaphore, the code had to release the lock entirely
      and then re-take it as a writelock.  However, that meant that the caller
      possibly lost the vma chain that it was following, since now another
      thread could come in and mmap/munmap the range.
      
      The code tried to work around that by just looking up the vma again and
      erroring out if that happened, but quite frankly, that was just a buggy
      hack that doesn't actually protect against anything (the other thread
      could just have replaced the vma with another one instead of totally
      unmapping it).
      
      The only way to downgrade to a read map _reliably_ is to do it at the
      end, which is likely the right thing to do: do all the 'vma' operations
      with the write-lock held, then downgrade to a read after completing them
      all, and then do the "populate the newly mlocked regions" while holding
      just the read lock.  And then just drop the read-lock and return to user
      space.
      
      The (perhaps somewhat simpler) alternative is to just make all the
      callers of mlock_vma_pages_range() know that the mmap lock got dropped,
      and just re-grab the mmap semaphore if it needs to mlock more than one
      vma region.
      
      So we can do this "downgrade mmap sem while populating mlocked regions"
      thing right, but the way it was done here was absolutely not correct.
      Thus the revert, in the expectation that we will do it all correctly
      some day.
      
      Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      27421e21
    • Devin Heitmueller's avatar
      V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning · 67e70baf
      Devin Heitmueller authored
      Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it
      to know that the tuner has been told to change frequencies.  This change
      changes the behavior from "random tuning times between 500ms to complete
      tuning lock failures" to "tuning lock consistently within 700ms".
      
      Thanks to Robert Krakora <rob.krakora@messagenetsystems.com> for doing
      initial testing of the patch on the KWorld 330U.
      
      Thanks to Andy Walls <awalls@radix.net> for doing testing of the patch on
      the HVR-1600.
      
      Thanks to Michael Krufky <mkrufky@linuxtv.org> for doing additional testing.
      Signed-off-by: default avatarDevin Heitmueller <dheitmueller@linuxtv.org>
      Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      67e70baf