Re: [RFC] Per file OOM badness

2018-01-19 Thread roger
On 2018年01月19日 16:25, Michal Hocko wrote: [removed the broken quoting - please try to use an email client which doesn't mess up the qouted text] On Fri 19-01-18 06:01:26, He, Roger wrote: [...] I think you are misunderstanding here. Actually for now, the memory in TTM Pools alread

[PATCH] drm/amd/amdgpu: fix performance drop

2016-12-27 Thread Roger . He
From: "Hongbo.He" rollback to ttm default callback since OCL perf benchmark huge performance drop Change-Id: If4cfc5a52872a7e00a7cbcad6efa46c57ee533de Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH] drm/amd/amdgpu: decrease ttm bo priority to fix performance drop when VRAM pressure

2017-03-27 Thread Roger . He
1. When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it. 2. Also reserve priority for KFD using Change-Id: Idcd2db65be69d62bcbd7dfaa3bcf9bc964d6d122 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- include/drm/ttm/ttm_bo_dri

[PATCH 2/2] drm/amd/amdgpu: decrease ttm bo priority number

2017-03-27 Thread Roger . He
decrease and also reserve priority number for KFD using Change-Id: I9e36d292c920c034ddca53d0ec282c17b7a3cf16 Signed-off-by: Roger.He Reviewed-by: Christian König --- include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/ttm/ttm_bo_driver

[PATCH 1/2] drm/amd/amdgpu: fix performance drop when VRAM pressure

2017-03-27 Thread Roger . He
When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it. Change-Id: Idcd2db65be69d62bcbd7dfaa3bcf9bc964d6d122 Signed-off-by: Roger.He Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletio

[PATCH 2/3] drm/amdgpu: validate bo before restoring from shadow

2017-04-21 Thread Roger . He
Change-Id: Id925f4e241c4192127880d2017fbf2979aa09fc7 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 1/3] drm/amdgpu: fix indent

2017-04-21 Thread Roger . He
Change-Id: I3a81680648fbaca74662c85709c864fa3a4a75bd Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 34 +++--- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 3/3] drm/amdgpu: fix gpu reset issue

2017-04-21 Thread Roger . He
Change-Id: Ib77d33a09f348ebf2e3a9d7861411f4b951ebf7c Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.

[PATCH] drm/amdgpu: validate shadow before restoring from it

2017-04-24 Thread Roger . He
Change-Id: Id925f4e241c4192127880d2017fbf2979aa09fc7 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 33 ++ 1 file changed, 33 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH] drm/amdgpu: extend lock range for race condition when gpu reset

2017-05-05 Thread Roger . He
to cover below case: 1. A task gart bind/unbind but not add to adev->gtt_list yet 2. at this time gpu reset, gtt only recover those gtt in adev->gtt_list Change-Id: Ifb4360e3b68624f2be67fa82100623cf4c451873 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu

RE: [PATCH] drm/amdgpu: use 2MB fragment size for GFX6,7 and 8

2017-09-18 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Monday, September 18, 2017 8:34 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: use 2MB fragment size for

[PATCH 1/2] drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

2017-11-02 Thread Roger He
Change-Id: Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c7ccd6f

RE: [PATCH] drm/ttm: set bo->resv point to tbo->ttm_resv after individualize_resv

2017-11-07 Thread He, Roger
reed already. And I think it is not easy to put it out of two lock of bo->resv and bo->ttm_resv. Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Michel D?nzer Sent: Wednesday, November 08, 2017 12:16 AM To: Christ

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH 6/7] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
->list_kref, ttm_bo_ref_bug); spin_unlock(&glob->lru_lock); ttm_bo_cleanup_memtype_use(bo); if (unlock_resv) //[Roger]: not sure we should add condition here as well. If not, for per-vm-bo, evictio

RE: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
Please see comments inline -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, November 08, 2017 11:00 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Subject: [PATCH 3/4] drm/ttm: make unlocking in

[PATCH] drm/amd/amdgpu: not allow gtt size exceed system memory size

2017-11-10 Thread Roger He
since sometimes VRAM size is bigger than system memory Change-Id: I5b14d18ed7a9f79810cc50c023ac9e240bddf101 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH] drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again

2017-11-10 Thread Roger He
Change-Id: Ib30efa5f007fce12a85a66722a8c9f76496f2dec Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index fb72edc..a1eaabb 100644 --- a

RE: [PATCH] drm/amd/amdgpu: not allow gtt size exceed system memory size

2017-11-10 Thread He, Roger
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, November 10, 2017 8:02 PM To: He, Roger ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amd/amdgpu: not allow gtt size exceed system memory size Am 10.11.2017 um 12:33 schrieb

[PATCH] drm/amd/amdgpu: not allow gtt size exceed 75%*system memory size

2017-11-12 Thread Roger He
keep consistency with threshold of swapout Change-Id: I5b14d18ed7a9f79810cc50c023ac9e240bddf101 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers

RE: [PATCH] drm/amdgpu: extend lock range for race condition when gpu reset

2017-06-16 Thread He, Roger
Hi Xiangliang: Could you try to replace spinlock with mutex? Thanks Roger(Hongbo.He) -Original Message- From: Yu, Xiangliang Sent: Friday, June 16, 2017 2:30 PM To: Christian König ; Zhou, David(ChunMing) ; He, Roger ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu

RE: upsteam find bo api

2017-06-16 Thread He, Roger
What is the background or what is it for? Thanks Roger(Hongbo.He) From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of zhoucm1 Sent: Friday, June 16, 2017 4:09 PM To: amd-gfx@lists.freedesktop.org Subject: Fwd: upsteam find bo api ping...? Forwarded Message

RE: upsteam find bo api

2017-06-18 Thread He, Roger
Patches Look good to me in itself. Acked-by: Roger.He mailto:hongbo...@amd.com>> But of course you should double confirm if there is Christian’s concern. Thanks Roger(Hongbo.He) From: Zhou, David(ChunMing) Sent: Friday, June 16, 2017 7:18 PM To: He, Roger ; amd-gfx@lists.freedesktop.org S

RE: [PATCH 3/3] drm/amdgpu: add gtt_sys_limit

2017-06-27 Thread He, Roger
Setting limitation for max GTT table size is necessary. But my only concern is that is it enough for amdgpu_gart_sys_limit 256M. whether it will trigger GTT eviction from GTT to CPU domain easily? Because GTT size always equals to VRAM size before it scales with system memory size. Thanks Roger

RE: [PATCH 3/3] drm/amdgpu: add gtt_sys_limit

2017-06-27 Thread He, Roger
. Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Felix Kuehling Sent: Wednesday, June 28, 2017 3:25 AM To: Christian König ; Michel Dänzer ; John Brooks Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 3/3] drm/amdgpu

RE: [PATCH] drm/amdgpu: fix amdgpu_bo_gpu_accessible()

2017-07-13 Thread He, Roger
Reviewed-and-Tested-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, July 13, 2017 6:23 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: [PATCH] drm/amdgpu: fix

[PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter

2017-08-15 Thread Roger He
Change-Id: I70e4ea94b8520e19cfee5ba6c9a0ecf1ee3f5f1a Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7

[PATCH 1/2] drm/amd/amdgpu: add fragment size in vm_manager

2017-08-15 Thread Roger He
Change-Id: If8de884538b8eca2214f21242925d854e16e63b7 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 +++-- drivers

RE: [PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter

2017-08-15 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Tuesday, August 15, 2017 4:48 PM To: He, Roger ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter Am 15.08.2017 um 10:36 schrieb Roger He: > Change

[PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter

2017-08-15 Thread Roger He
Change-Id: I70e4ea94b8520e19cfee5ba6c9a0ecf1ee3f5f1a Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 25

RE: [PATCH 1/3] drm/amdgpu: remove the GART copy hack

2017-08-23 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, August 23, 2017 5:03 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 1/3] drm/amdgpu: remove the GART copy

RE: [PATCH 3/3] drm/amdgpu: inline amdgpu_ttm_do_bind again

2017-08-23 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, August 23, 2017 5:03 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 3/3] drm/amdgpu: inline

[PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10

2017-08-24 Thread Roger He
BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. Change-Id: I8cfcff197e2c571c1a547aaed959e492b4a6fe0e Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 3 +-- 2 files

RE: [PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10

2017-08-25 Thread He, Roger
Ok. Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Friday, August 25, 2017 3:33 PM To: He, Roger ; amd-gfx@lists.freedesktop.org Cc: Koenig, Christian Subject: Re: [PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10 Hi Roger

[PATCH] drm/amd/amdgpu: fix build warning

2017-08-25 Thread Roger He
Change-Id: I335123d3f77b11adc65b29463e12f825d19ca382 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers

[PATCH] drm/amd/amdgpu: cover fragment size between 4 and 9 when not aligned

2017-08-29 Thread Roger He
this can get performance improvement for some cases Change-Id: Ibb58bb3099f7e8c4b5da90da73a03544cdb2bcb7 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 98 +++--- 1 file changed, 79 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm

RE: [PATCH] drm/amd/amdgpu: cover fragment size between 4 and 9 when not aligned

2017-08-30 Thread He, Roger
Additional to that the patch needs to be simplified, cause another 5 level recursion is not something we want because of the limited kernel stack (only 4K usually). [Roger]: fragment = min(fragment, max(0, fls64(end - start) - 1)) so the next level fragment which depends on the (end-start

RE: [PATCH] drm/amdgpu: fix new PD update code for Vega10 v2

2017-08-31 Thread He, Roger
Reviewed-and-Tested-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, August 31, 2017 7:58 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: fix new PD update

RE: [PATCH] drm/amdgpu: handle all fragment sizes v4

2017-08-31 Thread He, Roger
It works very well! Tested-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, August 31, 2017 5:45 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: handle all

RE: [PATCH] drm/amdgpu: fix VM sync with always valid BOs v2

2017-09-11 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Monday, September 11, 2017 6:53 PM To: Zhou, David(ChunMing) ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu

RE: [PATCH 3/5] drm/radeon: remove extra TT unpopulated check

2018-02-04 Thread He, Roger
The subsystem chould check that, not the driver. Commit log typo, should be "should" rather than " chould". With that fix, this patch is Reviewed-by: Roger He Thanks Roger(Hongbo.He) Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_ttm.c | 3 --- 1 file

RE: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-04 Thread He, Roger
Patch1 & 2 & 4, Reviewed-by: Roger He Patch 5: Acked-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Saturday, February 03, 2018 3:10 AM To: amd-gfx@lists.freedesktop.org

[PATCH 0/5] prevent OOM triggered by TTM

2018-02-06 Thread Roger He
defaut), keep the original behavior no any change. Roger He (5): drm/ttm: check if the free swap space is under limit 256MB drm/ttm: keep original behavior except with flag no_retry drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx drm/ttm: add bit flag

[PATCH 1/5] drm/ttm: check if the free swap space is under limit 256MB

2018-02-06 Thread Roger He
> 256MB and at that time free swap space is under 256MB but available system mem > its lower limit, allow TTM allocation; b. if total swap space < 256 or no swap disk at all, check the available system mem, if it is bigger than its threshold, allow TTM allocation. Signed-off-by:

[PATCH 2/5] drm/ttm: keep original behavior except with flag no_retry

2018-02-06 Thread Roger He
set the no_retry flag in struct ttm_mem_global and init it after ttm_mem_global_init Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +--- drivers/gpu/drm/ttm/ttm_memory.c| 3 +++ include/drm/ttm/ttm_memory.h| 3 +++ 3 files changed, 11 insertions

[PATCH 3/5] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-06 Thread Roger He
for saving memory and more bit flag can be used in future Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- include/drm/ttm/ttm_bo_api.h | 7

[PATCH 4/5] drm/ttm: add bit flag TTM_OPT_FLAG_ALLOW_ALLOC_ANYWAY

2018-02-06 Thread Roger He
will trigger OOM killer. v2: keep original behavior except ttm bo with flag no_retry Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_memory.c | 25 + drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 - include

[PATCH 5/5] drm/ttm: add input parameter allow_allo_anyway for ttm_bo_evict_mm

2018-02-06 Thread Roger He
if true for it, allocate TTM pages regardless of zone global memory account limit. that is for another special case: suspend. doesn't care the zone global memory account limit for this case. Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/dr

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-06 Thread He, Roger
, because initially I also concern that but no better way at that time. Going to improve the patches. Thanks! -Original Message- From: Koenig, Christian Sent: Tuesday, February 06, 2018 5:52 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Cc: tho

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-07 Thread He, Roger
truct ttm_bo_device to let driver set according to its request. Thanks Roger(Hongbo.He) -Original Message- From: Thomas Hellstrom [mailto:tho...@shipmail.org] Sent: Wednesday, February 07, 2018 2:43 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Cc: K

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-07 Thread He, Roger
Sure, will make it turn off as default and make the limit configurable. Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, February 07, 2018 4:41 PM To: He, Roger ; Thomas Hellstrom ; amd-gfx@lists.freedesktop.org

RE: [PATCH 3/9] drm/amdgpu: add amdgpu module parameter for zfb

2018-02-08 Thread He, Roger
econd because memory migration, the CMA memory allocation performance is not very good as normal. When I used CMA feature with 3.16 kernel encountered more issues. So not pretty sure CMA module and other modules are very robust in 4.15 kernel. Thanks Roger(Hongbo.He) -Original Message- From

[PATCH 1/4] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-08 Thread Roger He
for saving memory and more bit flag can be used in future Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- include/drm/ttm/ttm_bo_api.h | 7

[PATCH 2/4] drm/ttm: add bit flag TTM_OPT_FLAG_FORCE_ALLOC

2018-02-08 Thread Roger He
trigger OOM killer. the subsequent patche will use this. v2: keep original behavior except ttm bo with flag no_retry Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 - include/drm/ttm/ttm_bo_api.h | 4 +++- 3

[PATCH 4/4] drm/ttm: check if the mem free space is under lower limit

2018-02-08 Thread Roger He
allocation. v2: merge two memory limit(swap and system) into one v3: keep original behavior except with ttm->page_flags TTM_PAGE_FLAG_NO_RETRY Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 34 drivers/gpu/drm/ttm/ttm_page_alloc.c |

[PATCH 3/4] drm/ttm: add input parameter force_alloc for ttm_bo_evict_mm

2018-02-08 Thread Roger He
if true, allocate TTM pages regardless of zone global memory account limit. For suspend, We should avoid TTM memory allocate failure then result in suspend failure. Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4

RE: [PATCH 3/4] drm/ttm: add input parameter force_alloc for ttm_bo_evict_mm

2018-02-08 Thread He, Roger
I can't think of an use case when we don't want this to succeed. That is true. seems I can simplify more here. Thanks Roger(Hongbo.He) -Original Message- From: Koenig, Christian Sent: Thursday, February 08, 2018 8:58 PM To: He, Roger ; amd-gfx@lists.freedesktop.or

RE: [PATCH 4/4] drm/ttm: keep BOs reserved until end of eviction

2018-02-23 Thread He, Roger
looks good to me. Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, February 20, 2018 8:58 PM To: amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org; linux-ker

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
rue; For the special case: when command submission with Per-VM-BO enabled, All BOs a/b/c are always valid BO. After the validation of BOs a and b, when validation of BO c, is it possible to return true and then evict BO a and b by mistake ? Because a/b/c share same task_struct. Thanks Roger(Ho

RE: [PATCH 2/4] drm/amdgpu: use new ww_mutex_is_owned_by function

2018-02-23 Thread He, Roger
Reviewed-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, February 20, 2018 8:58 PM To: amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org; linux-ker...@vger.kernel.org Subject: [PATCH

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, February 23, 2018 8:06 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH 3/4] drm/ttm: handle already

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
I missed the Per-VM-BO share the reservation object with root bo. So context is not NULL here. So, this patch is: Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, February 23, 2018 8:06 PM To

RE: [PATCH 4/5] drm/ttm: add ttm_sg_tt_init

2018-03-05 Thread He, Roger
Patch 1: Acked-by: Roger He Patch 2~5: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Monday, March 05, 2018 8:07 PM To: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Ben

RE: [PATCH 1/6] drm/ttm: add ttm_bo_pipeline_gutting

2018-03-07 Thread He, Roger
Patch 1,4,5: Acked-by: Roger He Patch 2,3,6: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, March 06, 2018 10:44 PM To: amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org

RE: [PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs

2018-03-26 Thread He, Roger
Reviewed-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Friday, March 16, 2018 9:21 PM To: linaro-mm-...@lists.linaro.org; linux-me...@vger.kernel.org; dri-de...@lists.freedesktop.org; amd-gfx

RE: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given

2018-03-26 Thread He, Roger
Acked-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Sunday, March 25, 2018 6:58 PM To: linaro-mm-...@lists.linaro.org; linux-me...@vger.kernel.org; dri-de...@lists.freedesktop.org; amd-gfx

RE: [PATCH 1/2] drm/ttm: fix ttm_mem_evict_first once more

2017-11-15 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, November 15, 2017 8:32 PM To: amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Subject: [PATCH 1/2

[PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread Roger He
a1d8a0 Change-Id: I60d90d13dda69cd8aa6396f0246379f8390e3fb1 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index ee77364..a

RE: 答复: [PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread He, Roger
Ok, so keep your logic here. Going to send a new patch soon. Thanks Roger(Hongbo.He) -Original Message- From: Deng, Emily Sent: Friday, November 17, 2017 1:44 PM To: He, Roger ; Zhou, David(ChunMing) ; Qu, Jim ; amd-gfx@lists.freedesktop.org Cc: Koenig, Christian Subject: RE: 答复

RE: 答复: [PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread He, Roger
Theoretically, if first < fence_count, array[first] will not be NULL. Hi Emily: do you remember the issue you fixed has same error log? Thanks Roger(Hongbo.He) -Original Message- From: Zhou, David(ChunMing) Sent: Friday, November 17, 2017 1:24 PM To: Qu, Jim ; He, Roger ; amd-

[PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread Roger He
a1d8a0 Change-Id: I60d90d13dda69cd8aa6396f0246379f8390e3fb1 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index ee77364..18549d4

[PATCH 0/4] *** fix memory leak for HUGE PAGE ***

2017-11-21 Thread Roger He
1. add page order into pool to support gtt huge page 2. add page order support when ttm pages put 3. update memory shrinker with order handling Roger He (4): drm/ttm: add page order in page pool drm/ttm: use NUM_PAGES_TO_ALLOC always drm/ttm: add page order support in ttm_pages_put drm

[PATCH 1/4] drm/ttm: add page order in page pool

2017-11-21 Thread Roger He
to indicate page order for each element in the pool Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 2/4] drm/ttm: use NUM_PAGES_TO_ALLOC always

2017-11-21 Thread Roger He
Change-Id: Ide96a1ccad9bb44b0bb0d80e123c2d810ba618ed Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 2b83c52..27b2402 100644

[PATCH 3/4] drm/ttm: add page order support in ttm_pages_put

2017-11-21 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 +--- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm

[PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-21 Thread Roger He
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 90546fd..c194a51

[PATCH 2/4] drm/ttm: add page order support in ttm_pages_put

2017-11-21 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 +--- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm

[PATCH 1/4] drm/ttm: add page order in page pool

2017-11-21 Thread Roger He
to indicate page order for each element in the pool Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 ++-- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 3/4] drm/ttm: add static buffer for ttm_pages_put to support pool shrink

2017-11-21 Thread Roger He
Change-Id: Ic20c016eb3043d7cfedc2e3648790a017168da6c Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c

[PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-21 Thread Roger He
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 37c2f2f..f80fc5b

[PATCH 1/5] drm/ttm: add page order in page pool

2017-11-22 Thread Roger He
to indicate page order for each element in the pool Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 ++-- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 2/5] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 2db551f..fabb082 100644 --- a

[PATCH 3/5] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index

[PATCH 4/5] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-22 Thread Roger He
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 343db0b..82d40c6

[PATCH 5/5] drm/ttm: delete set_pages_array_wb since no one use it anymore

2017-11-22 Thread Roger He
Change-Id: I9fa45af447c3c78d0b7b2b8958081e584c560120 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 82d40c6..53fd8e9 100644 --- a

RE: [PATCH 1/4] drm/ttm: add page order in page pool

2017-11-22 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Wednesday, November 22, 2017 3:48 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Subject: Re: [PATCH 1/4] drm/ttm: add page order in page pool Am 22.11.2017 um 06:36 schrieb Roger He: > to indic

[PATCH 1/5] drm/ttm: add page order in page pool

2017-11-22 Thread Roger He
to indicate page order for each element in the pool Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 38 +--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 2/5] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index a02bd65..9b48b93 100644 --- a

[PATCH 4/5] drm/ttm: roundup the shrink request to prevent skip huge pool

2017-11-22 Thread Roger He
e.g. shrink reqeust is less than 512, the logic will skip huge pool Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 3/5] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index

[PATCH 5/5] drm/ttm: delete set_pages_array_wb since no one use it anymore

2017-11-22 Thread Roger He
Change-Id: I9fa45af447c3c78d0b7b2b8958081e584c560120 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index a710d9e..388c5b1 100644 --- a

RE: [PATCH 2/4] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread He, Roger
Hi Christian: This is old patch, I already send new patches. And it is clean and simple. Please check that. Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, November 22, 2017 5:29 PM To: He, Roger ; amd-gfx

RE: [PATCH 3/5] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread He, Roger
Hi Christian: Maybe we can get back the logic for page order 0 in ttm_pages_put. I mean: handle order 0 with set_pages_array_wb and handle order 9 with set_pages_wb. If that, no performance concern. How about that? Thanks Roger(Hongbo.He) -Original Message- From: Christian König

[PATCH 2/3] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index

[PATCH 3/3] drm/ttm: roundup the shrink request to prevent skip huge pool

2017-11-22 Thread Roger He
e.g. shrink reqeust is less than 512, the logic will skip huge pool Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 1/3] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index a8b2bfa..cdbb731 100644 --- a

[PATCH] drm/amd/amdgpu: set gtt size according to system memory size only

2017-11-28 Thread Roger He
Change-Id: Ib634375b90d875fe04a890fc82fb1e3b7112676a Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index

RE: [PATCH] drm/amd/amdgpu: set gtt size according to system memory size only

2017-11-28 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Tuesday, November 28, 2017 6:01 PM To: He, Roger ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amd/amdgpu: set gtt size according to system memory size only Am 28.11.2017 um 10:40 schrieb Roger He: > Change

  1   2   >