[PATCH 0/2] optimization on shadow ctx population and updating
Yan Zhao
yan.y.zhao at intel.com
Wed Apr 15 03:56:33 UTC 2020
patch 1 removes repeatedly calling to kmap()/kunmap() for accessing shadow
ctx pages. Instead, it accesses the pages through its base virtual
address.
patch 2 combines guest ctx pages access if the guest context pages are
found to be contiguous in IOVA.
with the two patches,
average cycles for populate_shadow_context() and update_guest_context()
are reduced by ~10000-20000 cycles, depending on the average number of
consecutive pages in each read/write.
(1) comparison of cycles of
populate_shadow_context() + update_guest_context() when executing
different benchmarks
-------------------------------------------------------------
| cycles | glmark2 | lightsmark | openarena |
|-------------------------------------------------------------|
| before this patch | 65968 | 97852 | 61373 |
| after this patch | 56017 (85%) | 73862 (75%) | 47463 (77%) |
-------------------------------------------------------------
(2) average count of pages read/written a time in
populate_shadow_context() and update_guest_context()
for each benchmark
-----------------------------------------------------------
| page cnt | glmark2 | lightsmark | openarena |
|-----------------------------------------------------------|
| before this patch | 1 | 1 | 1 |
| after this patch | 5.25 | 19.99 | 20 |
------------------------------------------------------------
(3) comparison of benchmarks scores
---------------------------------------------------------------------
| score | glmark2 | lightsmark | openarena |
|---------------------------------------------------------------------|
| before this patch | 1244 | 222.18 | 114.4 |
| after this patch | 1248 (100.3%) | 225.8 (101.6%) | 115.0 (100.9%) |
---------------------------------------------------------------------
Yan Zhao (2):
drm/i915/gvt: access shadow ctx via its virtual address directly
drm/i915/gvt: combine access to consecutive guest context pages
drivers/gpu/drm/i915/gvt/scheduler.c | 93 +++++++++++++++++++---------
1 file changed, 65 insertions(+), 28 deletions(-)
--
2.17.1
More information about the intel-gvt-dev
mailing list