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

alignment-hack jl_task_t to bring it back from the size 400 to the size 368 pool #49088

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JeffBezanson
Copy link
Member

No description provided.

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

If you really want to compact this significantly, make the jl_ucontext_t ctx; a pointer, and move it to the bottom of the stack (or incorporate into the copystack buffer) just before we switch away from it

@JeffBezanson
Copy link
Member Author

That's a good idea!

@Keno
Copy link
Member

Keno commented Mar 21, 2023

There's also the version where we only store ip/sp and let the compiler spill everything else by calling convention.

@oscardssmith
Copy link
Member

@StefanKarpinski also has been thinking about ways to get the rng state down from 32 to 24 bytes

src/julia.h Outdated
@@ -1958,6 +1948,13 @@ typedef struct _jl_task_t {
size_t bufsz; // actual sizeof stkbuf
unsigned int copy_stack:31; // sizeof stack for copybuf
unsigned int started:1;
Copy link
Member

Choose a reason for hiding this comment

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

Can we fold started into the reentrant_timing field? Otherwise started and copystack don't have a known location in the struct, which makes identifying padding bytes harder.

@StefanKarpinski
Copy link
Member

The splittable RNG stuff adds 64 bits (8 bytes), but I do have an idea for a hybrid xoroshiro128/pcg64 RNG that would have a large cycle, avoid the pitfalls of each of the components, and only take 192 bits (24 bytes), so that would compensate for the additional 8 bytes for the splittable part. So after my recent change the total RNG state is 5 64-bit words but I could potentially get it back down to 4 64-bit words, which is what it was before.

@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Feb 13, 2024
@vtjnash
Copy link
Member

vtjnash commented Feb 14, 2024

Requires a test update to llvmpasses

/cache/build/builder-amdci4-2/julialang/julia-master/test/llvmpasses/alloc-opt-gcframe.ll:15:10: error: TYPED: expected string not found in input

@vchuravy vchuravy removed the merge me PR is reviewed. Merge when all tests are passing label Feb 15, 2024
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.

7 participants