1. 18 Jun, 2011 2 commits
    • Peter Zijlstra's avatar
      mm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas() · eee2acba
      Peter Zijlstra authored
      This matches the anon_vma_clone() case, and uses the same lock helper
      functions.  Because of the need to potentially release the anon_vma's,
      it's a bit more complex, though.
      
      We traverse the 'vma->anon_vma_chain' in two phases: the first loop gets
      the anon_vma lock (with the helper function that only takes the lock
      once for the whole loop), and removes any entries that don't need any
      more processing.
      
      The second phase just traverses the remaining list entries (without
      holding the anon_vma lock), and does any actual freeing of the
      anon_vma's that is required.
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Tested-by: default avatarHugh Dickins <hughd@google.com>
      Tested-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      eee2acba
    • Linus Torvalds's avatar
      mm: avoid repeated anon_vma lock/unlock sequences in anon_vma_clone() · bb4aa396
      Linus Torvalds authored
      In anon_vma_clone() we traverse the vma->anon_vma_chain of the source
      vma, locking the anon_vma for each entry.
      
      But they are all going to have the same root entry, which means that
      we're locking and unlocking the same lock over and over again.  Which is
      expensive in locked operations, but can get _really_ expensive when that
      root entry sees any kind of lock contention.
      
      In fact, Tim Chen reports a big performance regression due to this: when
      we switched to use a mutex instead of a spinlock, the contention case
      gets much worse.
      
      So to alleviate this all, this commit creates a small helper function
      (lock_anon_vma_root()) that can be used to take the lock just once
      rather than taking and releasing it over and over again.
      
      We still have the same "take the lock and release" it behavior in the
      exit path (in unlink_anon_vmas()), but that one is a bit harder to fix
      since we're actually freeing the anon_vma entries as we go, and that
      will touch the lock too.
      Reported-and-tested-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Tested-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Andi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bb4aa396
  2. 17 Jun, 2011 1 commit
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · eb96c925
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/radeon/kms: use helper functions for fence read/write
        drm/radeon/kms: set DP link config properly for DP bridges
        drm/radeon/kms/atom: AdjustPixelClock fixes for DP bridges
        drm/radeon/kms: fix handling of DP to LVDS bridges
        drm/radeon/kms: issue blank/unblank commands for ext encoders
        drm/radeon/kms: fix support for DDC on dp bridges
        drm/radeon/kms: add support for load detection on dp bridges
        drm/radeon/kms: add missing external encoder action
        drm/radeon/kms: rework atombios_get_encoder_mode()
        drm/radeon/kms: fix num crtcs for Cedar and Caicos
        Revert "drm/i915: Enable GMBUS for post-gen2 chipsets"
        drivers/gpu/drm: use printk_ratelimited instead of printk_ratelimit
        drm/radeon: workaround a hw bug on some radeon chipsets with all-0 EDIDs.
        drm: make debug levels match in edid failure code.
        drm/radeon/kms: clear wb memory by default
        drm/radeon/kms: be more pedantic about the g5 quirk (v2)
        drm/radeon/kms: signed fix for evergreen thermal
        drm: populate irq_by_busid-member for pci
      eb96c925
  3. 16 Jun, 2011 37 commits