summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorOhad Sharabi <osharabi@habana.ai>2021-12-20 14:30:35 +0300
committerOded Gabbay <ogabbay@kernel.org>2021-12-26 15:40:25 +0300
commit60bf3bfb5a37965fc33fa00f19a2074dd48077c5 (patch)
treec3a5eeb7a88064c798efa56c3fb4d231b6d233a7 /drivers/virtio
parentf297a0e9fe7d4b4d8a24d2ce97446f2faaf9d51b (diff)
downloadlinux-60bf3bfb5a37965fc33fa00f19a2074dd48077c5.tar.xz
habanalabs: handle skip multi-CS if handling not done
This patch fixes issue in which we have timeout for multi-CS although the CS in the list actually completed. Example scenario (the two threads marked as WAIT for the thread that handles the wait_for_multi_cs and CMPL as the thread that signal completion for both CS and multi-CS): 1. Submit CS with sequence X 2. [WAIT]: call wait_for_multi_cs with single CS X 3. [CMPL]: CS X do invoke complete_all for both CS and multi-CS (multi_cs_completion_done still false) 4. [WAIT]: enter poll_fences, reinit the completion and find the CS as completed when asking on the fence but multi_cs_done is still false it returns that no CS actually completed 5. [CMPL]: set multi_cs_handling_done as true 6. [WAIT]: wait for completion but no CS to awake the wait context and hence wait till timeout Solution: if CS detected as completed in poll_fences but multi_cs_done is still false invoke complete_all to the multi-CS completion and so it will not go to sleep in wait_for_completion but rather will have a "second chance" to wait for multi_cs_completion_done. Signed-off-by: Ohad Sharabi <osharabi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions