Hi Christian: Could the patch for mmap splited pages be applied to ttm? if so, I can sent out the patch. Thanks JimQu ________________________________________ å??件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Christian König <deathsimple at vodafone.de> å??é??æ?¶é?´: 2016å¹´11æ??7æ?¥ 16:12 æ?¶ä»¶äºº: Qu, Jim; amd-gfx at lists.freedesktop.org 主é¢?: Re: ç?å¤?: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2 > Here , checking place->lpfn , is that mean if required place is located in visible vram, driver run none pages split code path? Yes, exactly. CPU accessible allocations weren't meant to be split with the initial implementation. For this we need to be able map scattered allocations into the CPU VM page tables first. You kind of implemented this, but it would still cause a ping/pong of the BO inside the visible VRAM space. We would need to move the handling of AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED from amdgpu_ttm_placement_init() down into the VRAM manager as well. Regards, Christian. Am 07.11.2016 um 03:10 schrieb Qu, Jim: > HI Christian: > > if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS || > - amdgpu_vram_page_split == -1) { > + place->lpfn || amdgpu_vram_page_split == -1) { > pages_per_node = ~0ul; > num_nodes = 1; > } else { > > Here , checking place->lpfn , is that mean if required place is located in visible vram, driver run none pages split code path? > if so, seem it comes back to the starting point. In extreme cases, allocate visible vram fail. > > Thanks > JimQu > > ________________________________________ > å??件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Christian König <deathsimple at vodafone.de> > å??é??æ?¶é?´: 2016å¹´11æ??4æ?¥ 19:00 > æ?¶ä»¶äºº: amd-gfx at lists.freedesktop.org > 主é¢?: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2 > > From: Christian König <christian.koenig at amd.com> > > This disables the VRAM manager when a special placement is requested, otherwise > we play ping/pong with the buffers on every command submission. > > v2: only check lpfn > > Signed-off-by: Christian König <christian.koenig at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > index 180eed7c..d710226 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c > @@ -108,7 +108,7 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, > lpfn = man->size; > > if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS || > - amdgpu_vram_page_split == -1) { > + place->lpfn || amdgpu_vram_page_split == -1) { > pages_per_node = ~0ul; > num_nodes = 1; > } else { > -- > 2.5.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx