From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>,
Chris Wilson <chris@chris-wilson.co.uk>,
Intel-gfx@lists.freedesktop.org,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 2/3] drm/i915: Infrastructure for supporting different GGTT views per object
Date: Thu, 04 Dec 2014 12:17:51 +0000 [thread overview]
Message-ID: <548050EF.4060108@linux.intel.com> (raw)
In-Reply-To: <20141204105925.GM32117@phenom.ffwll.local>
On 12/04/2014 10:59 AM, Daniel Vetter wrote:
> On Thu, Dec 04, 2014 at 10:26:14AM +0000, Chris Wilson wrote:
>> On Thu, Dec 04, 2014 at 10:19:09AM +0000, Tvrtko Ursulin wrote:
>>>
>>> On 12/04/2014 09:53 AM, Chris Wilson wrote:
>>>> On Wed, Dec 03, 2014 at 02:59:25PM +0000, Tvrtko Ursulin wrote:
>>>>> +void i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
>>>>> + u32 flags)
>>>>> +{
>>>>> + struct sg_table *pages = i915_ggtt_view_pages(vma);
>>>>> +
>>>>> + if (pages && !IS_ERR(pages)) {
>>>>> + vma->bind_vma(vma, pages, cache_level, flags);
>>>>> +
>>>>> + if (vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL) {
>>>>> + sg_free_table(pages);
>>>>> + kfree(pages);
>>>>> + }
>>>>> + }
>>>>> +}
>>>>
>>>> Stop. Even if the failure path is impossible with the present
>>>> implementation, here you are masking the error only to go and pretend
>>>> the binding succeeded.
>>>>
>>>> Don't be lazy, this is a very nasty bug that should be hit during igt -
>>>> or else you are not testing well enough.
>>>
>>> Fair comment, even if a bit too assuming. I actually had this as
>>> TODO but somehow lost it.
>>>
>>> I don't have any ideas on how to provoke this to fail from an IGT?
>>> Even with future implementations it boils down to a couple of small
>>> allocations which would have to fail reliably.
>>
>> We have quite a few thrash tests now that are fairly good at getting
>> even the small allocations to fail.
>>
>> What we don't have is a single-fd, multi-ctx thrash test (well except
>> for some GL tests...)
>
> But none of these tests result in permanent memory failures (only the
> occasional ioctl restart when waiting for gpu rendering). And sg table
> alloc only recurses through the shrinker so that can't happen. So I think
> we just have to get by with review.
>
> We did have issues with sg table allocations in stress tests though,
> before we've added the recursive shrinker locking, hence sg table alloc
> can indeed go south.
I looked at propagating errors from i915_vma_bind() out to callers and
it is mostly all fine apart from the i915_gem_restore_gtt_mappings
during i915_drm_resume.
I don't see how this is fixable apart by going back and having sgls stay
around for the lifetime of their VMAs. It shouldn't be such a big deal -
they are not so big even with non-coalesced entries.
Thoughts?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-04 12:17 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 14:59 [PATCH 0/3] Multiple GGTT views Tvrtko Ursulin
2014-12-03 14:59 ` [PATCH 1/3] drm/i915: Stop putting GGTT VMA at the head of the list Tvrtko Ursulin
2014-12-04 9:48 ` Chris Wilson
2014-12-04 10:02 ` Tvrtko Ursulin
2014-12-04 10:17 ` Chris Wilson
2014-12-04 10:30 ` Tvrtko Ursulin
2014-12-04 10:39 ` Chris Wilson
2014-12-04 10:48 ` Tvrtko Ursulin
2014-12-04 10:54 ` Daniel Vetter
2014-12-03 14:59 ` [PATCH 2/3] drm/i915: Infrastructure for supporting different GGTT views per object Tvrtko Ursulin
2014-12-04 9:53 ` Chris Wilson
2014-12-04 10:19 ` Tvrtko Ursulin
2014-12-04 10:26 ` Chris Wilson
2014-12-04 10:59 ` Daniel Vetter
2014-12-04 12:17 ` Tvrtko Ursulin [this message]
2014-12-04 12:27 ` Chris Wilson
2014-12-04 13:01 ` Daniel Vetter
2014-12-03 14:59 ` [PATCH 3/3] drm/i915: Documentation for multiple GGTT views Tvrtko Ursulin
2014-12-04 7:12 ` shuang.he
2014-12-05 12:11 ` [PATCH v2 0/2] Multiple " Tvrtko Ursulin
2014-12-05 12:11 ` [PATCH 1/2] drm/i915: Infrastructure for supporting different GGTT views per object Tvrtko Ursulin
2014-12-05 14:25 ` Daniel Vetter
2014-12-09 15:23 ` Michel Thierry
2014-12-10 9:16 ` Daniel Vetter
2014-12-10 10:17 ` Tvrtko Ursulin
2014-12-05 12:11 ` [PATCH 2/2] drm/i915: Documentation for multiple GGTT views Tvrtko Ursulin
2014-12-09 15:41 ` Michel Thierry
2014-12-10 17:27 ` [PATCH v3 0/2] Multiple " Tvrtko Ursulin
2014-12-10 17:27 ` [PATCH 1/2] drm/i915: Infrastructure for supporting different GGTT views per object Tvrtko Ursulin
2014-12-11 10:18 ` Michel Thierry
2014-12-15 10:24 ` Daniel Vetter
2014-12-15 11:23 ` Tvrtko Ursulin
2014-12-10 17:27 ` [PATCH 2/2] drm/i915: Documentation for multiple GGTT views Tvrtko Ursulin
2014-12-11 3:41 ` shuang.he
2014-12-11 10:19 ` Michel Thierry
2014-12-15 8:30 ` Daniel Vetter
2014-12-15 10:01 ` Michel Thierry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548050EF.4060108@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.