]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction
authorChangbin Du <changbin.du@intel.com>
Thu, 6 Apr 2017 02:55:55 +0000 (10:55 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 12 Apr 2017 05:57:51 +0000 (13:57 +0800)
commit160985bd3d93040c0d2693c687c0a2be5affd95d
tree2ba2342b21706c8c9d80ffa2a1d6d3b95027d85e
parent1786e51df4eebbb4ba6a2163e5d0916aed083af2
drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction

From perf data, found a significant overhead at ring id check in the
function get_opcode. This inline function is frequently used.

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.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/cmd_parser.c