[PATCH] drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction
Du, Changbin
changbin.du at intel.com
Thu Apr 6 04:54:01 UTC 2017
On Wed, Apr 05, 2017 at 08:28:24PM -0700, Tian, Kevin wrote:
> > From: changbin.du at intel.com
> > Sent: Thursday, April 6, 2017 10:56 AM
> >
> > From: Changbin Du <changbin.du at intel.com>
> >
> > From perf data, found a significant overhead at ring id check in the
> > function get_opcode. This inline function is frequently used.
>
> How significant is it? Do you have some data?
>
It has 4.1% of Bad Speculation overhead in system wide. It is too high
in some measure.
> >
> > Since Intel static predictor will predict the branch to fall through
> > so the prediction most fail. This is wasting CPU pipeline resource.
> > We do not need check the engine id everywhere, it should be reliable.
>
> what do you mean by "should be reliable"? Meaning the caller is
> expected to check ring_id before calling this inline function, or
> something else?
>
yes, the outmost caller should check the id. Inside gvtg module code we can
aussume the ring id always correct. To some extend I think this just
like 'do we need check null for each pointer parameter'.
--
Thanks,
Changbin Du
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170406/d37a3b2f/attachment.sig>
More information about the intel-gvt-dev
mailing list