]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Optimize ring siwtch 2x faster by removing unnecessary POSTING_READ
authorChangbin Du <changbin.du@intel.com>
Fri, 23 Jun 2017 07:45:31 +0000 (15:45 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 10 Aug 2017 02:26:05 +0000 (10:26 +0800)
commit34a9cdd75d426968c1409b5f00abc5339e05c86d
tree848bf95e8bd279c2ee88159988bf8e6bc039f5b2
parent031e6a9542de63a30d91c80d13bc8dd59a5bca3f
drm/i915/gvt: Optimize ring siwtch 2x faster by removing unnecessary POSTING_READ

There are lots of POSTING_READ alongside each mmio write Op. While
actually this is not necessary. It just bring too much latency since
PCIe read Op is very slow which is of non-posted transaction.

For PCIe device, the mem transaction for strong ordering rules are:
  o PCIe mmio write sequence is FIFO. Posted request cannot
    pass previous posted request.
  o PCIe mmio read will not go ahead of previous write.

Intel graphics doesn't support RO, so we can apply above rules. In
our case, we only need one POSTING_READ at last. This can remove
half of mmio read Op and then the average ring switch performance
is nearly doubled.
         Before       After
cycles  ~970000      ~550000

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