[Bug 69247] [GM45/ILK/SNB/BYT/BDW]igt/gem_evict_everything/forked-swapping-multifd-mempressure-normal causes OOM killer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 10 22:46:37 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=69247

--- Comment #58 from lu hua <huax.lu at intel.com> ---
patching file drivers/gpu/drm/i915/i915_gem.c
Hunk #1 FAILED at 4920.
Hunk #2 succeeded at 4911 with fuzz 1 (offset -28 lines).
Hunk #3 succeeded at 5007 with fuzz 1 (offset -24 lines).
1 out of 3 hunks FAILED -- saving rejects to file
drivers/gpu/drm/i915/i915_gem.                                                 
                                               c.rej

drivers/gpu/drm/i915/i915_gem.c:
static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
{
        if (!mutex_is_locked(mutex))
                return false;

#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
        return mutex->owner == task;
#else
        /* Since UP may be pre-empted, we cannot assume that we own the lock */
        return false;
#endif
}

static unsigned long
i915_gem_inactive_count(struct shrinker *shrinker, struct shrink_control *sc)
{


patch: 
@@ -4920,6 +4920,22 @@ static bool mutex_is_locked_by(struct mutex *mutex,
struct task_struct *task)
 #endif
 }

+static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
+{
+    if (!mutex_trylock(&dev->struct_mutex)) {
+        if (!mutex_is_locked_by(&dev->struct_mutex, current))
+            return false;
+
+        if (to_i915(dev)->mm.shrinker_no_lock_stealing)
+            return false;
+
+        *unlock = false;
+    } else
+        *unlock = true;
+
+    return true;
+}
+
 static int num_vma_bound(struct drm_i915_gem_object *obj)
 {
     struct i915_vma *vma;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20140311/d84652c2/attachment-0001.html>


More information about the intel-gfx-bugs mailing list