Skip to content

Conversation

dlongnecke-cray
Copy link
Contributor

This PR improves the dynamic loading internals by making the code locale-agnostic instead of explicitly synchronizing on e.g., Locales[0].

It also adjusts loaded binaries so that they live on the locale where create is first called rather than always being allocated on Locales[0]. It's unclear to me what benefit this might have (other than reducing contention on arguably the most contested locale in a program), but it also didn't feel right to have an explicit Locales[0] either. I go back and forth on whether or not binaries should be privatized, but ultimately it doesn't seem worth the cost (unlike a procedure pointer cache, which is accessed much more frequently).

While here, I've tweaked and removed some comments, opting to remove some that I found to be redundant. I've also added some more TODOs.

Before, the code would do things like explicitly synchronize on e.g.,
'Locales[0]'. Now, the code will synchronize 'on this' instead.

While here, improve/remove comments and add a new helper routine.

Signed-off-by: David Longnecker <[email protected]>
@dlongnecke-cray dlongnecke-cray self-assigned this Sep 25, 2025
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