[PATCH 1/4] drm/vmwgfx: Assign eviction priorities to resources

Daniel Vetter daniel at ffwll.ch
Tue Jun 18 12:19:50 UTC 2019


On Tue, Jun 18, 2019 at 11:54:08AM +0100, Emil Velikov wrote:
> Hi Thomas,
> 
> On 2019/06/18, Thomas Hellström (VMware) wrote:
> > From: Thomas Hellstrom <thellstrom at vmware.com>
> > 
> > TTM provides a means to assign eviction priorities to buffer object. This
> > means that all buffer objects with a lower priority will be evicted first
> > on memory pressure.
> > Use this to make sure surfaces and in particular non-dirty surfaces are
> > evicted first. Evicting in particular shaders, cotables and contexts imply
> > a significant performance hit on vmwgfx, so make sure these resources are
> > evicted last.
> > Some buffer objects are sub-allocated in user-space which means we can have
> > many resources attached to a single buffer object or resource. In that case
> > the buffer object is given the highest priority of the attached resources.
> > 
> > Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
> > Reviewed-by: Deepak Rawat <drawat at vmware.com>
> Fwiw patches 1-3 are:
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> 
> Patch 4 is:
> Acked-by: Emil Velikov <emil.velikov at collabora.com>
> 
> Huge thanks for sorting this out.

Oh, does this mean we can remove the varios master* callbacks from
drm_driver now? Iirc vmwgfx was the only user, and those callbacks seem
very tempting to various folks for implementing questionable driver hacks
... Happy to type the patches, but maybe simpler if you do that since all
this gets merged through the vmwgfx tree.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list