<div dir="ltr">Hi Dave,<br><br>thank you again.<br><br>I searched, where the memory for the request came from, it is set in <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/gpu/drm/i915/i915_gem.c?id=refs/tags/v3.14.67#n2158">line 2158 of i915_gem.c</a><br>and the kmalloc is in <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/gpu/drm/i915/intel_ringbuffer.c?id=refs/tags/v3.14.67#n1600">intel_ring_alloc_seqno() in intel_ringbuffer.c</a>, right?<br><br>So I will test the following patch for intel_ringbuffer.c:<br><br><br>intel_ring_alloc_seqno(struct intel_ring_buffer *ring)<br>{<br> if (ring->outstanding_lazy_seqno)<br> return 0;<br><br> if (ring->preallocated_lazy_request == NULL) {<br> struct drm_i915_gem_request *request;<br><br> request = kmalloc(sizeof(*request), GFP_KERNEL);<br> if (request == NULL)<br> return -ENOMEM;<br>+<br>+ INIT_LIST_HEAD(&request->list);<br> ring->preallocated_lazy_request = request;<br> }<br><br> return i915_gem_get_seqno(ring->dev, &ring->outstanding_lazy_seqno);<br>}<br>:<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-27 20:28 GMT+02:00 Dave Gordon <span dir="ltr"><<a href="mailto:david.s.gordon@intel.com" target="_blank">david.s.gordon@intel.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2016-04-27 12:03 GMT+02:00 Dave Gordon <<a href="mailto:david.s.gordon@intel.com" target="_blank">david.s.gordon@intel.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 27/04/16 10:19, Andreas Lampersperger wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
has anyone here a hint for me, what can cause this error.<br>
The error occures highly sporadic on different machines with intel hd<br>
graphics (ivb_gt1).<br>
I did also some kernel coredumps and found out, that the failed<br>
paging request came from drm_i915_gem_request->list.prev or ->list.next.<br>
<br>
Thank you<br>
Andreas<br>
</blockquote>
<br>
Try this patch.<br>
<br>
.Dave.<br>
</blockquote>
<br>
</blockquote></span><span class="">
On 27/04/16 13:20, Andreas Lampersperger wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Dave,<br>
<br>
thank you for the patch, but I'm using longtime kernel 3.14.66 and so the<br>
patch does not fit.<br>
Do you have any suggestions for that kernel?<br>
<br>
Andreas<br>
</blockquote>
<br></span>
I have no idea what the code would look like in that version; do you have any way to get the git commit hash or tag of the i915 driver?<br>
<br>
But essentially, if you have the kernel sources for that version, you could look for a line that allocates a "struct drm_i915_gem_request". It might be<br>
<br>
req = kmem_cache_zalloc(dev_priv->requests, GFP_KERNEL);<br>
<br>
or in older versions it might be<br>
<br>
request = kzalloc(sizeof(*request), GFP_KERNEL);<br>
<br>
or some other variation. It should of course be followed by a test for successful allocation, e.g.<br>
<br>
if (request == NULL)<br>
return -ENOMEM;<br>
<br>
If you can find that line (or lines, at one time there were TWO such places), then you just have to add<br>
<br>
INIT_LIST_HEAD(&request->list);<br>
<br>
after the test-for-NULL, or anywhere inline thereafter. For example:<br>
<br>
request = kzalloc(sizeof(*request), GFP_KERNEL);<br>
if (request == NULL)<br>
return -ENOMEM;<br>
<br>
ret = i915_gem_get_seqno(ring->dev, &request->seqno);<br>
if (ret) {<br>
kfree(request);<br>
return ret;<br>
}<br>
<br>
+ INIT_LIST_HEAD(&request->list);<br>
kref_init(&request->ref);<br>
request->ring = ring;<br>
request->uniq = dev_private->request_uniq++;<br>
<br>
HTH,<br>
.Dave.<br>
</blockquote></div><br></div>