drm/i915/gvt: Refine the combined intel_vgpu_oos_page struct to save memory
authorZhao Yakui <yakui.zhao@intel.com>
Wed, 20 Feb 2019 04:07:45 +0000 (12:07 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 20 Feb 2019 09:05:36 +0000 (17:05 +0800)
commited47c5cb8ee638b1c60fbb65c82c8784bf68539d
tree8249f41cce6e28e736aaafac034b505d57cead96
parentf74a6d9a2c427b6656bc93eacfa6d329ba54d611
drm/i915/gvt: Refine the combined intel_vgpu_oos_page struct to save memory

The intel_vgpu_oos_page uses the combined structure, which embeds the
tracked page. As it is allocated by kmalloc, the size(4140) is aligned
to 8192. The 8192 oos_pages will waste about 32M memory.
So the tracked page is split from the intel_vgpu_oos_page. And this will
help to assure that the access of tracked page is cache aligned.

Another minor change is that it doesn't need to be cleared to zero as
it is writen firstly when one page is added to oos_page list.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gtt.c
drivers/gpu/drm/i915/gvt/gtt.h