[Libva] BSD ring selection

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 24 08:19:16 UTC 2016


On Thu, Nov 24, 2016 at 08:07:36AM +0000, Tvrtko Ursulin wrote:
> 
> Hi all,
> 
> I am curious on the current operation of the driver with regards to
> the ring selection and usage.
> 
> As far as I can gather from the code, the driver is happy for the
> kernel to choose the ring (on configurations with more than one ring
> of course) and seems to be able to run mostly independently of the
> selection. (I said mostly because there are some batches which are
> explicitly sent to BSD0 ring, based on the feature matrix.)
> 
> Have I missed something or there is really nothing else special the
> driver does with respect to which ring it is running?
> 
> I am looking into this in the context of the long standing desire to
> auto-balance workloads better. For example
> https://bugs.freedesktop.org/show_bug.cgi?id=97872 expresses the
> need to balance per batch buffer as well.
> 
> This leads me to the second part of the question and that is the
> hardware state. Does the driver currently depend on the hardware
> state?

No. They cannot since they are using the default context whose ABI is
that there is *no* state carried over between batches.

> Because if we would to implement per batch buffer load balancing in
> the kernel, the driver would have to make sure that it doesn't
> depend on any state left by the previous batch. Perhaps this is not
> a concern, I really know nothing of how the BSD engines are used.

Why do this in the kernel when userspace already has the tools to do it?
The only thing preventing them is the abysmal fake BSD selection that
originated from libva.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Libva mailing list