aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-08-05 02:47:29 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-05 13:04:06 -0400
commit87a6b688ccc78b2c54bee56879c6d195d2457ebe (patch)
tree7d7dd8b16fde14f1de8d7e292f6e1207b7581396 /drivers/gpu/drm/i915/i915_gem_gtt.c
parent6d5c2d8ca3c15a191a8078316e547c1f4e5ad6eb (diff)
drm/i915/hsw: Change default LLC age to 3
The default LLC age was changed: commit 0d8ff15e9a15f2b393e53337a107b7a1e5919b6d Author: Ben Widawsky <benjamin.widawsky@intel.com> Date: Thu Jul 4 11:02:03 2013 -0700 drm/i915/hsw: Set correct Haswell PTE encodings. On the surface it would seem setting a default age wouldn't matter because all GEM BOs are aged similarly, so the order in which objects are evicted would not be subject to aging. The current working theory as to why this caused a regression though is that LLC is a bit special in that it is shared with the CPU. Presumably (not verified) the CPU fetches cachelines with age 3, and therefore recently cached GPU objects would be evicted before similar CPU object first when the LLC is full. It stands to reason therefore that this would negatively impact CPU bound benchmarks - but those seem to be low on the priority list. eLLC OTOH does not have this same property as LLC. It should be used entirely for the GPU, and so the age really shouldn't matter. Furthermore, we have no evidence to suggest one is better than another on eLLC. Since we've never properly supported eLLC before no, there should be no regression. If the GPU client really wants "younger" objects, they should use MOCS. v2: Drop the extra #define (Chad) v3: Actually git add v4: Pimped commit message Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67062 Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e7b420495516..3e7f1242af91 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -52,6 +52,7 @@
52 */ 52 */
53#define HSW_CACHEABILITY_CONTROL(bits) ((((bits) & 0x7) << 1) | \ 53#define HSW_CACHEABILITY_CONTROL(bits) ((((bits) & 0x7) << 1) | \
54 (((bits) & 0x8) << (11 - 3))) 54 (((bits) & 0x8) << (11 - 3)))
55#define HSW_WB_LLC_AGE3 HSW_CACHEABILITY_CONTROL(0x2)
55#define HSW_WB_LLC_AGE0 HSW_CACHEABILITY_CONTROL(0x3) 56#define HSW_WB_LLC_AGE0 HSW_CACHEABILITY_CONTROL(0x3)
56#define HSW_WB_ELLC_LLC_AGE0 HSW_CACHEABILITY_CONTROL(0xb) 57#define HSW_WB_ELLC_LLC_AGE0 HSW_CACHEABILITY_CONTROL(0xb)
57 58
@@ -105,7 +106,7 @@ static gen6_gtt_pte_t hsw_pte_encode(dma_addr_t addr,
105 pte |= HSW_PTE_ADDR_ENCODE(addr); 106 pte |= HSW_PTE_ADDR_ENCODE(addr);
106 107
107 if (level != I915_CACHE_NONE) 108 if (level != I915_CACHE_NONE)
108 pte |= HSW_WB_LLC_AGE0; 109 pte |= HSW_WB_LLC_AGE3;
109 110
110 return pte; 111 return pte;
111} 112}