45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Feng Tang <feng.tang@intel.com>
|
|
Date: Wed, 30 Jan 2019 13:39:58 +0800
|
|
Subject: [PATCH] drm/i915/gvt: optimize the oos memory setup
|
|
|
|
current oos memory occupy 33M memory, and its initialization
|
|
takes about 30ms for APL. Since now PVMMIO is used instead of
|
|
oos, reduce its memory size. Also change the kzalloc to kmalloc
|
|
as the oos page will be read first anyway. With this, the setup
|
|
time could be reduced to 3ms.
|
|
|
|
Tracked-On: projectacrn/acrn-hypervisor#2451
|
|
Tracked-On: PKT-1737
|
|
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Feng Tang <feng.tang@intel.com>
|
|
---
|
|
drivers/gpu/drm/i915/gvt/gtt.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
|
|
index 12d8f23..d8a05a6 100644
|
|
--- a/drivers/gpu/drm/i915/gvt/gtt.c
|
|
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
|
|
@@ -45,7 +45,7 @@
|
|
#endif
|
|
|
|
static bool enable_out_of_sync = true;
|
|
-static int preallocated_oos_pages = 8192;
|
|
+static int preallocated_oos_pages = 2048;
|
|
|
|
/*
|
|
* validate a gm address and related range size,
|
|
@@ -2705,7 +2705,7 @@ static int setup_spt_oos(struct intel_gvt *gvt)
|
|
INIT_LIST_HEAD(>t->oos_page_use_list_head);
|
|
|
|
for (i = 0; i < preallocated_oos_pages; i++) {
|
|
- oos_page = kzalloc(sizeof(*oos_page), GFP_KERNEL);
|
|
+ oos_page = kmalloc(sizeof(*oos_page), GFP_KERNEL);
|
|
if (!oos_page) {
|
|
ret = -ENOMEM;
|
|
goto fail;
|
|
--
|
|
https://clearlinux.org
|
|
|