Re: force app kill patch

2018-04-18 Thread Christian König
n. /Monk *From:*Christian König [mailto:ckoenig.leichtzumer...@gmail.com] *Sent:* 2018年4月18日16:36 *To:* Liu, Monk ; Koenig, Christian ; Deng, Emily *Cc:* amd-gfx@lists.freedesktop.org *Subject:* Re: force app kill patch See that in “sched_entity_fini”, we only call dma_fence_put(entit

RE: force app kill patch

2018-04-18 Thread Liu, Monk
e put/get pair on entity->last_scheduled prior to spsc_queue_pop() and the race issue is therefore avoided /Monk From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: 2018年4月18日 16:36 To: Liu, Monk ; Koenig, Christian ; Deng, Emily Cc: amd-gfx@lists.freedesktop.org Subject: R

Re: force app kill patch

2018-04-18 Thread Christian König
See that in “sched_entity_fini”, we only call dma_fence_put(entity->last_scheduled”under the condition of “If (entity->fini_status)”, so This way there is memory leak for the case of “entity->fini_stats ==0” Good catch, we indeed should fix that. 1.Drm_sched_entity_fini(): it exit right afte

RE: force app kill patch

2018-04-18 Thread Liu, Monk
*Correctio for the scenario * After we move fence_put(entity->last_sched) out of the fini_status check: A potential race issue for the scenario: 1.Drm_sched_entity_fini(): it exit right after entity->job_queue empty, [ but that time scheduler is not fast enough to deal with this entit