Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small sys_spu thread group termination fixes #8049

Merged
merged 4 commits into from Apr 28, 2020

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Apr 16, 2020

  • Always return ESTAT after atleast one ppu has called terminate on an spu group, even if the thread group hasn't finished execution yet.
  • Add missing cpu state check sys_spu_thread_receive_event, in case the group just entered termination process so it would not try to enqueue a waiter for SPU event queue.
  • Wait for SPU event to be received in sys_spu_thread_group_exit, we can't exit while waiting on event. Explicitly forbid it as well.

@elad335 elad335 changed the title Avoid a race in sys_spu_thread_group_terminate Make ESTAT consistent in sys_spu_thread_group_terminate Apr 16, 2020
@elad335 elad335 changed the title Make ESTAT consistent in sys_spu_thread_group_terminate Make ESTAT consistent in sys_spu_thread_group_terminate, minor sys_spu_thread_receive_event bugfix with it Apr 16, 2020
@elad335 elad335 changed the title Make ESTAT consistent in sys_spu_thread_group_terminate, minor sys_spu_thread_receive_event bugfix with it Small sys_spu thread group termination fixes Apr 16, 2020
Also use atomic check for group->run_state outside the mutex,
explicitly forbid group termination while we are waiting for an event to be received.
@elad335 elad335 force-pushed the terminate branch 5 times, most recently from 6786cf2 to 42d14b6 Compare April 17, 2020 06:22
@AniLeo AniLeo requested a review from Nekotekina April 26, 2020 18:54
@Nekotekina Nekotekina merged commit 7da8ba5 into RPCS3:master Apr 28, 2020
@elad335 elad335 deleted the terminate branch July 30, 2020 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants