Skip to content

LATX, fix: bound final AOT exclusive wait#316

Open
ganjue66da wants to merge 1 commit into
lat-opensource:masterfrom
ganjue66da:t2
Open

LATX, fix: bound final AOT exclusive wait#316
ganjue66da wants to merge 1 commit into
lat-opensource:masterfrom
ganjue66da:t2

Conversation

@ganjue66da

Copy link
Copy Markdown
Contributor

Final AOT generation runs during process exit and may try to enter an exclusive section after other threads are already blocked in native/host code. In that case start_exclusive() can wait forever for CPUs that will not quiesce.

Add start_exclusive_timeout() and use it only for the final AOT exit path. If the timeout expires, cancel the pending waiters, skip final AOT, and return without holding the exclusive section. Normal AOT generation continues to use the existing blocking start_exclusive() path.

Final AOT generation runs during process exit and may try to enter an
exclusive section after other threads are already blocked in native/host
code. In that case start_exclusive() can wait forever for CPUs that will
not quiesce.

Add start_exclusive_timeout() and use it only for the final AOT exit
path. If the timeout expires, cancel the pending waiters, skip final AOT,
and return without holding the exclusive section. Normal AOT generation
continues to use the existing blocking start_exclusive() path.

Signed-off-by: Wenqiang Wei <weiwenqiang@mail.ustc.edu.cn>
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.

1 participant