Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Christian König
adding a wrapper for pin function as below? amdgpu_get_pin_bo_timeout() { do { amdgpo_bo_reserve(); r=amdgpu_bo_pin(); if(!r)     break; amdgpu_bo_unreserve(); timeout--; } while(timeout>0); } Original Message ---- Subject: Re: [PATCH] ttm: wait mem space if user allow

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread zhoucm1
u_bo_pin(); if(!r)     break; amdgpu_bo_unreserve(); timeout--; } while(timeout>0); } Original Message -------- Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,&qu

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Koenig, Christian
gt;resv inline to address your concern? As well as don't wait from same user, shouldn't lead to deadlock. Otherwise, any other idea? Original Message Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Liang, Prike&quo

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread zhoucm1
ssage -------- Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,"Liang, Prike" ,dri-devel@lists.freedesktop.org CC: Well that's not so easy of hand. The basic problem here

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Christian König
erve(); r=amdgpu_bo_pin(); if(!r)     break; amdgpu_bo_unreserve(); timeout--; } while(timeout>0); } Original Message -------- Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koeni

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Koenig, Christian
y not trivial, but doable as far as I can see. >> >> Have fun :) >> Christian. >> >> Am 23.04.19 um 15:19 schrieb Zhou, David(ChunMing): >> >> How about adding more condition ctx->resv inline to address your concern? As >> well as don't wait from same user, s

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Daniel Vetter
fun :) > Christian. > > Am 23.04.19 um 15:19 schrieb Zhou, David(ChunMing): > > How about adding more condition ctx->resv inline to address your concern? As > well as don't wait from same user, shouldn't lead to deadlock. > > Otherwise, any other idea? &g

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread zhoucm1
function as below? amdgpu_get_pin_bo_timeout() { do { amdgpo_bo_reserve(); r=amdgpu_bo_pin(); if(!r)     break; amdgpu_bo_unreserve(); timeout--; } while(timeout>0); } Original Message ---- Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian K

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Christian König
u_bo_pin(); if(!r)     break; amdgpu_bo_unreserve(); timeout--; } while(timeout>0); } Original Message ---- Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,"L

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread zhoucm1
s well as don't wait from same user, shouldn't lead to deadlock. Otherwise, any other idea? ---- Original Message Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Liang, Prike" ,"Zhou, David(ChunMing)"

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-24 Thread Christian König
timeout--; } while(timeout>0); } Original Message Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,"Liang, Prike" ,dri-devel@lists.freedesktop.org CC: We

Re:[PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-23 Thread Zhou, David(ChunMing)
l Message Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Christian König To: "Zhou, David(ChunMing)" ,"Koenig, Christian" ,"Liang, Prike" ,dri-devel@lists.freedesktop.org CC: Well that's not so easy of hand. The basic problem here is t

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-23 Thread Christian König
eb Zhou, David(ChunMing): How about adding more condition ctx->resv inline to address your concern? As well as don't wait from same user, shouldn't lead to deadlock. Otherwise, any other idea? Original Message -------- Subject: Re: [PATCH] ttm: wait mem space if user allow

Re:[PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-23 Thread Zhou, David(ChunMing)
How about adding more condition ctx->resv inline to address your concern? As well as don't wait from same user, shouldn't lead to deadlock. Otherwise, any other idea? Original Message Subject: Re: [PATCH] ttm: wait mem space if user allow while gpu busy From: Ch

Re: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-23 Thread Christian König
Sent: Monday, April 22, 2019 6:39 PM To: dri-devel@lists.freedesktop.org Cc: Liang, Prike ; Zhou, David(ChunMing) Subject: [PATCH] ttm: wait mem space if user allow while gpu busy heavy gpu job could occupy memory long time, which could lead to other user fail to get memory. Chan

RE: [PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-22 Thread Liang, Prike
Acked-by: Prike Liang Thanks, Prike -Original Message- From: Chunming Zhou Sent: Monday, April 22, 2019 6:39 PM To: dri-devel@lists.freedesktop.org Cc: Liang, Prike ; Zhou, David(ChunMing) Subject: [PATCH] ttm: wait mem space if user allow while gpu busy heavy gpu job could occupy

[PATCH] ttm: wait mem space if user allow while gpu busy

2019-04-22 Thread Chunming Zhou
heavy gpu job could occupy memory long time, which could lead to other user fail to get memory. Change-Id: I0b322d98cd76e5ac32b00462bbae8008d76c5e11 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/ttm/ttm_bo.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu