[Intel-gfx] [PATCH 1/3] drm/i915: Stop putting GGTT VMA at the head of the list

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 4 02:39:49 PST 2014


On Thu, Dec 04, 2014 at 10:30:30AM +0000, Tvrtko Ursulin wrote:
> 
> On 12/04/2014 10:17 AM, Chris Wilson wrote:
> >On Thu, Dec 04, 2014 at 10:02:19AM +0000, Tvrtko Ursulin wrote:
> >>
> >>On 12/04/2014 09:48 AM, Chris Wilson wrote:
> >>>On Wed, Dec 03, 2014 at 02:59:24PM +0000, Tvrtko Ursulin wrote:
> >>>>From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >>>>
> >>>>Multiple GGTT VMAs per object will be introduced in the near future which will
> >>>>make it impossible to guarantee normal GGTT view is at the head of the list.
> >>>>
> >>>>Purpose of this patch is to break this assumption straight away so any
> >>>>potential hidden assumptions in the code base can be bisected to this
> >>>>simple patch.
> >>>
> >>>No, please don't. The rationale for putting ggtt first is because it
> >>>puts the one vma that every object is likely to use at the front, and
> >>>makes it also the first in the list for debugging.
> >>
> >>This came from talking with Daniel, but I don't understand why every
> >>object is likely to have a GGTT mapping?
> >
> >Because the userspace usage pattern is such that it is typical that
> >every object is accessed through the GTT at some point in its life.
> >
> >It's actually becoming less so as we use alternative mmappings, but it
> >will remain so for quite some time yet.
> >
> >>With multiple GGTT views it may happen that only single GGTT VMA
> >>exists in the list but it is not the one current code would expect.
> >>So the idea was to break that to flesh out any potential hidden
> >>assumptions in the code. (I did not find any by just looking
> >>though.)
> >>
> >>What kind of debugging you have in mind, error capture? Or actually
> >>inspecting memory of a live kernel?
> >
> >Error capture inspection of memory of a live kernel.
> 
> So personally you don't think it should be of any concern if a GGTT
> VMA is at the head of the list, but it is not the same GGTT VMA
> which you would find there in majority of cases?

Actually, regarding error capture it is sorting of the vm list that is
important - so a different list.

I am still confused about why having different GGTT views makes it
difficult putting the normal GGTT vm first. I would very much like the
standard GGTT view remain first, and I would actually like the MRU
ppgtt last (so that the two most common uses are easily found).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list