Skip to content

Commit

Permalink
drm/amdkfd: Temporal workaround for memory problem on rocnredline
Browse files Browse the repository at this point in the history
Because of some intrigue bug in the kernel, the system may end up
with kicking off unintended memory eviction and restore. These
workarounds will temporally fix the issue.

Fix BUG: SWDEV-106528

Change-Id: I5d47bfa49459c62da49bbae6058c940b2d37b3f6
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
  • Loading branch information
Yong Zhao committed Nov 9, 2016
1 parent f9f44ab commit 1853014
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/ttm/ttm_memory.c
Original file line number Diff line number Diff line change
@@ -257,9 +257,9 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob,

zone->name = "kernel";
zone->zone_mem = mem;
zone->max_mem = mem >> 1;
zone->max_mem = (mem >> 1) + (mem >> 2);
zone->emer_mem = (mem >> 1) + (mem >> 2);
zone->swap_limit = zone->max_mem - (mem >> 3);
zone->swap_limit = zone->max_mem;
zone->used_mem = 0;
zone->glob = glob;
glob->zone_kernel = zone;
@@ -327,7 +327,8 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob,
* No special dma32 zone needed.
*/

if (mem <= ((uint64_t) 1ULL << 32)) {
/*if (mem <= ((uint64_t) 1ULL << 32)) {*/
if (1) {
kfree(zone);
return 0;
}

0 comments on commit 1853014

Please sign in to comment.