* weird reservation issues
@ 2018-02-28 10:37 Liu, Monk
[not found] ` <BLUPR12MB044995B6521FBE9C389BBE7184C70-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Liu, Monk @ 2018-02-28 10:37 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Koenig, Christian
[-- Attachment #1.1: Type: text/plain, Size: 990 bytes --]
Hi Christian
In amdgpu_cs_parser_bos(), it calls ttm_eu_backoff_reservation() if @need_pages not empty, is it safe ?
You see that if two threads in parallel running in cs_parser_bos(), if the thread1 did call backoff_reservation and continue, that leaves
All following reservation functions on root BO executed without protection from the lock, Meanwhile if this time thread2 call cs_parser_bos() in parallel, it can
Get the lock of the reservation object on root BO (assume thread 1/2 share the same VM) immediately, so both of those threads consider they are
Under protection of lock of reservation on the root bo. Do you think it's a race issue ?
You know that I recently hit BUG() in reservation.c, and also found some weird bugs can be fixed by removing the kfree(obj->staged)
In reservation_object_reserve_shared(), and I think you right on the "staged" part that it shouldn't be freed if everything go with rules (
Always held the lock of the bo)
Thanks
/Monk
[-- Attachment #1.2: Type: text/html, Size: 3888 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: weird reservation issues
[not found] ` <BLUPR12MB044995B6521FBE9C389BBE7184C70-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-02-28 10:49 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2018-02-28 10:49 UTC (permalink / raw)
To: Liu, Monk, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1350 bytes --]
Hi Monk,
yeah thinking about those issue currently as well. It indeed looks like
we have some kind of race here.
When we call backoff_reservation the next iteration of the look will
reserve all BOs again, so that can't be the issue.
Regards,
Christian.
Am 28.02.2018 um 11:37 schrieb Liu, Monk:
>
> Hi Christian
>
> In amdgpu_cs_parser_bos(), it calls ttm_eu_backoff_reservation() if
> @need_pages not empty, is it safe ?
>
> You see that if two threads in parallel running in cs_parser_bos(), if
> the thread1 did call backoff_reservation and continue, that leaves
>
> All following reservation functions on root BO executed without
> protection from the lock, Meanwhile if this time thread2 call
> cs_parser_bos() in parallel, it can
>
> Get the lock of the reservation object on root BO (assume thread 1/2
> share the same VM) immediately, so both of those threads consider they
> are
>
> Under protection of lock of reservation on the root bo. Do you think
> it’s a race issue ?
>
> You know that I recently hit BUG() in reservation.c, and also found
> some weird bugs can be fixed by removing the kfree(obj->staged)
>
> In reservation_object_reserve_shared(), and I think you right on the
> “staged” part that it shouldn’t be freed if everything go with rules (
>
> Always held the lock of the bo)
>
> Thanks
>
> /Monk
>
[-- Attachment #1.2: Type: text/html, Size: 4651 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-28 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 10:37 weird reservation issues Liu, Monk
[not found] ` <BLUPR12MB044995B6521FBE9C389BBE7184C70-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-02-28 10:49 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.