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

create phantom task for GC threads (#53815) & fix ordering in jl_safe_printf #141

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Mar 28, 2024

PR Description

A common idiom used throughout the codebase is to get a pointer to thread-local-state through jl_current_task->ptls.

Create a phantom task for GC threads so that we can make use of this idiom when running in the GC threads as well.

Idea originally suggested by @vchuravy, bugs are mine.

Checklist

Requirements for merging:

@d-netto d-netto requested a review from kpamnany March 28, 2024 17:15
@github-actions github-actions bot added port-to-v1.10 This change should apply to Julia v1.10 builds port-to-master This change should apply to all future Julia builds port-to-v1.9 This change should apply to Julia v1.9 builds labels Mar 28, 2024
Copy link
Collaborator

@kpamnany kpamnany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You haven't added the assert in jl_init_root_task that you have upstream?

Best to just cherry-pick an upstream commit into our build; it makes it easier to track RAI-specific changes to our build vs. backports.

src/partr.c Show resolved Hide resolved
@kpamnany kpamnany removed port-to-v1.10 This change should apply to Julia v1.10 builds port-to-master This change should apply to all future Julia builds port-to-v1.9 This change should apply to Julia v1.9 builds labels Mar 28, 2024
A common idiom used throughout the codebase is to get a pointer to
thread-local-state through `jl_current_task->ptls`.

Create a phantom task for GC threads so that we can make use of this
idiom when running in the GC threads as well.

Idea originally suggested by @vchuravy, bugs are mine.
@d-netto d-netto force-pushed the dcn-bugfix-for-safe-crash-log-file branch from 031dc83 to 14d41b7 Compare March 28, 2024 17:41
@d-netto
Copy link
Member Author

d-netto commented Mar 28, 2024

You haven't added the assert in jl_init_root_task that you have upstream?

Added in the last commit.

Copy link
Collaborator

@kpamnany kpamnany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@d-netto d-netto merged commit b5d3e64 into v1.10.2+RAI Mar 28, 2024
5 checks passed
@d-netto d-netto deleted the dcn-bugfix-for-safe-crash-log-file branch March 28, 2024 20:39
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.

2 participants