On 24/11/2016 08:19, Chris Wilson wrote:
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.
Excellent!
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?
Kernel would have the idea on the ring usage. Say one client only uses
BSD0, BSD1 is always idle, and then a second client comes in who want to
round-robin per batch. May be better to fix that one to BSD1 then, for
all batches that are satisfied by the BSD1 feature set. Or in other
words, how would userspace be able to figure the optimum scheduling?
The only thing preventing them is the abysmal fake BSD selection that
originated from libva.
Hm what do you mean? Why it couldn't be used for round-robin for
example, since you explained that the state doesn't matter. It does
enable explicit ring selection at any time.
Regards,
Tvrtko
_______________________________________________
Libva mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libva