Skip to contentSkip to conversation

drm/amdgpu: disable the VRAM manager on special placements v2

PATCH In review Christian König 5 participants 12 messages Nov 4, 2016 – Nov 9, 2016 7 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: disable the VRAM manager on special placements v2

From: Christian König <[email protected]>

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
index 180eed7c..d710226 100644
@@ -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 {
Signature · 6 lines
2.5.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1478257213-1946-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu: remove extra placement for AMDGPU_GEM_CREATE_NO_CPU_ACCESS

From: Christian König <[email protected]>

This only has the effect of scanning the invisible range twice since the topdown flag is given anyway.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -11
index 6efa8d7..052c1b0 100644
@@ -128,17 +128,6 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
 		if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
 			lpfn = adev->mc.real_vram_size >> PAGE_SHIFT;
 
-		if (flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS &&
-		    !(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
-		    adev->mc.visible_vram_size < adev->mc.real_vram_size) {
-			places[c].fpfn = visible_pfn;
-			places[c].lpfn = lpfn;
-			places[c].flags = TTM_PL_FLAG_WC |
-				TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM |
-				TTM_PL_FLAG_TOPDOWN;
-			c++;
-		}
-
 		places[c].fpfn = 0;
 		places[c].lpfn = lpfn;
 		places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |
Signature · 6 lines
2.5.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1478257213-1946-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: remove extra placement for AMDGPU_GEM_CREATE_NO_CPU_ACCESS

Hi Christian,
I have some time not to track code, I'm not sure if I miss anything.
In my mind, this change was added while doing performance optimization. If you don't encounter any problem, I'm suggesting not to change it, we have many regressions(bug and performance) recently.

Regards,
David Zhou

Quoted 22 lines · Christian König

From: Christian König <[email protected]>

This only has the effect of scanning the invisible range twice since the topdown flag is given anyway.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 -----------
  1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -4
index 6efa8d7..052c1b0 100644
@@ -128,17 +128,6 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
  		if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
  			lpfn = adev->mc.real_vram_size >> PAGE_SHIFT;
 
-		if (flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS &&
-		    !(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
-		    adev->mc.visible_vram_size < adev->mc.real_vram_size) {
-			places[c].fpfn = visible_pfn;

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c static void amdgpu_ttm_placement_init(struct amdgpu_device *adev, · line 133

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -7
-			places[c].lpfn = lpfn;
-			places[c].flags = TTM_PL_FLAG_WC |
-				TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM |
-				TTM_PL_FLAG_TOPDOWN;
-			c++;
-		}
-
  		places[c].fpfn = 0;
  		places[c].lpfn = lpfn;
  		places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: [PATCH 2/2] drm/amdgpu: remove extra placement for AMDGPU_GEM_CREATE_NO_CPU_ACCESS

Hi David,

well that additional placement range actually caused a performance problem.

It's only effect is that we check the invisible space twice, which can burn quite a bunch of CPU cycles during allocation.

Can you somehow easily check for performance regressions?

Regards,
Christian.

Am 07.11.2016 um 03:35 schrieb zhoucm1:

Quoted 32 lines

Hi Christian,
I have some time not to track code, I'm not sure if I miss anything.
In my mind, this change was added while doing performance optimization. If you don't encounter any problem, I'm suggesting not to change it, we have many regressions(bug and performance) recently.

Regards,
David Zhou

Quoted 24 lines · Christian König

From: Christian König <[email protected]>

This only has the effect of scanning the invisible range twice since the topdown flag is given anyway.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 -----------
  1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -5
index 6efa8d7..052c1b0 100644
@@ -128,17 +128,6 @@ static void amdgpu_ttm_placement_init(struct 
 amdgpu_device *adev,
          if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
              lpfn = adev->mc.real_vram_size >> PAGE_SHIFT;
  -        if (flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS &&
-            !(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
-            adev->mc.visible_vram_size < adev->mc.real_vram_size) {
-            places[c].fpfn = visible_pfn;
-            places[c].lpfn = lpfn;
-            places[c].flags = TTM_PL_FLAG_WC |
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c static void amdgpu_ttm_placement_init(struct amdgpu_device *adev, · line 133

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -5
-                TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM |
-                TTM_PL_FLAG_TOPDOWN;
-            c++;
-        }
-
          places[c].fpfn = 0;
          places[c].lpfn = lpfn;
          places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#7 lore raw

Re: [PATCH 2/2] drm/amdgpu: remove extra placement for AMDGPU_GEM_CREATE_NO_CPU_ACCESS

In reply to a message not in the archive
Quoted 23 lines · Christian König

From: Christian König <[email protected]>

This only has the effect of scanning the invisible range twice since the topdown flag is given anyway.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -4
index 6efa8d7..052c1b0 100644
@@ -128,17 +128,6 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
 		if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
 			lpfn = adev->mc.real_vram_size >> PAGE_SHIFT;
 
-		if (flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS &&
-		    !(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
-		    adev->mc.visible_vram_size < adev->mc.real_vram_size) {
-			places[c].fpfn = visible_pfn;

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c static void amdgpu_ttm_placement_init(struct amdgpu_device *adev, · line 133

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0 -7
-			places[c].lpfn = lpfn;
-			places[c].flags = TTM_PL_FLAG_WC |
-				TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM |
-				TTM_PL_FLAG_TOPDOWN;
-			c++;
-		}
-
 		places[c].fpfn = 0;
 		places[c].lpfn = lpfn;
 		places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |
Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#8 lore raw
In reply to a message not in the archive

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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月4日 19:00
收件人: [email protected]
主题: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

From: Christian König <[email protected]>

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
index 180eed7c..d710226 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BY2PR12MB0614AEAA868807A54E3DDAA999A70-K//h7OWB4q5SmL+xRiD5tgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#10 lore raw
Quoted 1 line

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:

Quoted 49 lines

HI Christian:

         if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ||
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
-           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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月4日 19:00
收件人: [email protected]
主题: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

From: Christian König <[email protected]>

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

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -2
index 180eed7c..d710226 100644
@@ -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

Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): c2cc7a0b-940a-a051-6d77-eb6fcd87fa4b-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#12 lore raw

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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月7日 16:12
收件人: Qu, Jim; [email protected]
主题: Re: 答复: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

Quoted 1 line

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:

Quoted 49 lines

HI Christian:

         if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ||
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
-           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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月4日 19:00
收件人: [email protected]
主题: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

From: Christian König <[email protected]>

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

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -2
index 180eed7c..d710226 100644
@@ -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

Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BY2PR12MB061436E9DC06B7698F4E7C4399A70-K//h7OWB4q5SmL+xRiD5tgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#14 lore raw

Yeah, please send that out.

Maybe just to me first, since we probably need to simplify and clean it up a bit, e.g. use a callback instead of duplicating much code etc...

But in general that sounded like a step into the right direction in out internal discussion.

We just need to change the placement as well to avoid this stupid moving around the buffer on every command submission.

Regards,
Christian.

Am 07.11.2016 um 09:16 schrieb Qu, Jim:

Quoted 80 lines

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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月7日 16:12
收件人: Qu, Jim; [email protected]
主题: Re: 答复: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

Quoted 1 line

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:

Quoted 49 lines

HI Christian:

          if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ||
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
-           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 <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月4日 19:00
收件人: [email protected]
主题: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

From: Christian König <[email protected]>

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

---
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -2
index 180eed7c..d710226 100644
@@ -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

Quoted 13 lines
Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#15 lore raw
In reply to a message not in the archive

Am 04.11.2016 um 12:00 schrieb Christian König:

Quoted 8 lines

From: Christian König <[email protected]>

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

Could anybody give a Reviewed-by for this? I think that is a rather important performance bug fix.

Regards,
Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 180eed7c..d710226 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, · line 114

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
@@ -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 {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 508632be-2cfc-de34-4ad7-68fb518c9d68-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

Reviewed-by Alex Deucher
#17 lore raw
Quoted 13 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Tuesday, November 08, 2016 8:10 AM
To: [email protected]; Qu, Jim; Zhou, David(ChunMing)
Subject: Re: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

Am 04.11.2016 um 12:00 schrieb Christian König:

Quoted 3 lines

From: Christian König <[email protected]>

This disables the VRAM manager when a special placement is requested,

otherwise

Quoted 8 lines
Quoted 5 lines

we play ping/pong with the buffers on every command submission.

v2: only check lpfn

Could anybody give a Reviewed-by for this? I think that is a rather important performance bug fix.

I swear I replied to this. Anyway, the series is:

Quoted 17 lines

Regards,
Christian.

Review

Quoted 5 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct

Quoted 4 lines

index 180eed7c..d710226 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -108,7 +108,7 @@ static int amdgpu_vram_mgr_new(struct

ttm_mem_type_manager *man,

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
  		lpfn = man->size;
 
Quoted 12 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, · line 114

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
  	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 {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by JimQu
#18 lore raw
In reply to a message not in the archive

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Christian König <[email protected]> 发送时间: 2016年11月8日 21:09
收件人: [email protected]; Qu, Jim; Zhou, David(ChunMing)
主题: Re: [PATCH 1/2] drm/amdgpu: disable the VRAM manager on special placements v2

Am 04.11.2016 um 12:00 schrieb Christian König:

Quoted 8 lines

From: Christian König <[email protected]>

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

Could anybody give a Reviewed-by for this? I think that is a rather important performance bug fix.

Regards,
Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 180eed7c..d710226 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, · line 114

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
@@ -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 {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx