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
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: Christian König To: "Liang, Pri

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
Well that is certainly a NAK because it can lead to deadlock in the memory management. You can't just busy wait with all those locks held. Regards, Christian. Am 23.04.19 um 03:45 schrieb Liang, Prike: Acked-by: Prike Liang Thanks, Prike -Original Message- From: Chunming Zhou Sent:

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 me