<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [GM45/ILK/SNB/BYT/BDW]igt/gem_evict_everything/forked-swapping-multifd-mempressure-normal causes OOM killer"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69247#c58">Comment # 58</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [GM45/ILK/SNB/BYT/BDW]igt/gem_evict_everything/forked-swapping-multifd-mempressure-normal causes OOM killer"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69247">bug 69247</a>
from <span class="vcard"><a class="email" href="mailto:huax.lu@intel.com" title="lu hua <huax.lu@intel.com>"> <span class="fn">lu hua</span></a>
</span></b>
<pre>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;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>