1. 26 7月, 2011 3 次提交
    • N
      md/raid5: replace sh->lock with an 'active' flag. · c4c1663b
      NeilBrown 提交于
      sh->lock is now mainly used to ensure that two threads aren't running
      in the locked part of handle_stripe[56] at the same time.
      
      That can more neatly be achieved with an 'active' flag which we set
      while running handle_stripe.  If we find the flag is set, we simply
      requeue the stripe for later by setting STRIPE_HANDLE.
      
      For safety we take ->device_lock while examining the state of the
      stripe and creating a summary in 'stripe_head_state / r6_state'.
      This possibly isn't needed but as shared fields like ->toread,
      ->towrite are checked it is safer for now at least.
      
      We leave the label after the old 'unlock' called "unlock" because it
      will disappear in a few patches, so renaming seems pointless.
      
      This leaves the stripe 'locked' for longer as we clear STRIPE_ACTIVE
      later, but that is not a problem.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Reviewed-by: NNamhyung Kim <namhyung@gmail.com>
      c4c1663b
    • N
      md/raid5: Protect some more code with ->device_lock. · cbe47ec5
      NeilBrown 提交于
      Other places that change or follow dev->towrite and dev->written take
      the device_lock as well as the sh->lock.
      So it should really be held in these places too.
      Also, doing so will allow sh->lock to be discarded.
      
      with merged fixes by: Namhyung Kim <namhyung@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Reviewed-by: NNamhyung Kim <namhyung@gmail.com>
      cbe47ec5
    • N
      md/raid5: Remove use of sh->lock in sync_request · 83206d66
      NeilBrown 提交于
      This is the start of a series of patches to remove sh->lock.
      
      sync_request takes sh->lock before setting STRIPE_SYNCING to ensure
      there is no race with testing it in handle_stripe[56].
      
      Instead, use a new flag STRIPE_SYNC_REQUESTED and test it early
      in handle_stripe[56] (after getting the same lock) and perform the
      same set/clear operations if it was set.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Reviewed-by: NNamhyung Kim <namhyung@gmail.com>
      83206d66
  2. 18 7月, 2011 5 次提交
  3. 16 7月, 2011 9 次提交
  4. 15 7月, 2011 4 次提交
  5. 14 7月, 2011 7 次提交
  6. 13 7月, 2011 10 次提交
  7. 12 7月, 2011 2 次提交
    • K
      Revert "drm/i915: enable rc6 by default" · 05bd4268
      Keith Packard 提交于
      This reverts commit a51f7a66.
      
      We still have a few Ironlake and Sandybridge machines which fail when
      RC6 is enabled. Better luck next release?
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      05bd4268
    • K
      drm/i915: Clean up i915_driver_load failure path · a7b85d2a
      Keith Packard 提交于
      i915_driver_load adds a write-combining MTRR region for the GTT
      aperture to improve memory speeds through the aperture. If
      i915_driver_load fails after this, it would not have cleaned up the
      MTRR. This shouldn't cause any problems, except for consuming an MTRR
      register. Still, it's best to clean up completely in the failure path,
      which is easily done by calling mtrr_del if the mtrr was successfully
      allocated.
      
      i915_driver_load calls i915_gem_load which register
      i915_gem_inactive_shrink. If i915_driver_load fails after calling
      i915_gem_load, the shrinker will be left registered. When called, it
      will access freed memory and crash. The fix is to unregister the shrinker in the
      failure path using code duplicated from i915_driver_unload.
      
      i915_driver_load also has some incorrect gotos in the error cleanup
      paths:
      
       * After failing to initialize the GTT (which cannot happen, btw,
         intel_gtt_get returns a fixed (non-NULL) value), it tries to
         free the uninitialized WC IO mapping. Fixed this by changing the
         target from out_iomapfree to out_rmmap
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Tested-by: NLin Ming <ming.m.lin@intel.com>
      a7b85d2a