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

runtime: move owned field to Trailer #4843

Merged
merged 3 commits into from
Jul 19, 2022

Conversation

Darksonn
Copy link
Contributor

This PR moves the owned field from the task header to the trailer.

Motivation. Various other PRs have run into trouble with the header not having enough space to add new fields. This PR exists to make more space in the header for those other PRs.

Why is this ok? The purpose of the trailer is to store fields only needed during shutdown of the task, and the owned field is only accessed during shutdown (and creation) of tasks, and during shutdown of the runtime. Thus, it is only rarely accessed. This makes it ok to store the field in cold memory.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Jul 19, 2022
@github-actions github-actions bot added the R-loom Run loom tests on this PR label Jul 19, 2022
@Darksonn Darksonn merged commit 228d4fc into tokio-rs:master Jul 19, 2022
@Darksonn Darksonn deleted the move-owned-to-trailer branch July 19, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime R-loom Run loom tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants