Skip to content

Use custom allocator for JITServer client MessageBuffers #19808

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

Merged

Conversation

cjjdespres
Copy link
Contributor

A global, reference-counted allocator is now created at JITServer clients that is used to allocate the memory used by the internal MessageBuffer storage buffer during client/server communication. This allocator's memory segments are disclaimed if the number of connections to the server drops to zero, and the compiler will also periodically attempt to destroy the allocator entirely.

@cjjdespres cjjdespres requested a review from dsouzai as a code owner July 3, 2024 22:57
@cjjdespres
Copy link
Contributor Author

Attn @mpirvu. I wasn't sure where to put it, so this happens to attempt to destroy the MessageBuffer allocator on transition to IDLE.

@mpirvu mpirvu self-assigned this Jul 3, 2024
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Jul 3, 2024
@cjjdespres cjjdespres force-pushed the disclaim-free-message-buffer branch from 3938aeb to 234bade Compare July 5, 2024 15:11
@cjjdespres cjjdespres force-pushed the disclaim-free-message-buffer branch from 234bade to 9c1fac9 Compare July 5, 2024 17:04
Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

LGTM

@mpirvu
Copy link
Contributor

mpirvu commented Jul 5, 2024

jenkins test sanity xlinuxjit,zlinuxjit,alinux64jit jdk21

1 similar comment
@mpirvu
Copy link
Contributor

mpirvu commented Jul 5, 2024

jenkins test sanity xlinuxjit,zlinuxjit,alinux64jit jdk21

@mpirvu
Copy link
Contributor

mpirvu commented Jul 6, 2024

coredumps on x86

@mpirvu
Copy link
Contributor

mpirvu commented Jul 6, 2024

I tried AcmeAirEE8 with this change and the server is crashing. Something is not right.

@cjjdespres
Copy link
Contributor Author

I see one thing wrong - when I moved the monitor initialization into rossa.cpp, I had it be only initialized in client mode. However, my original MessageBuffer constructor and destructor changes assume that both the client and the server have the monitor initialized.

A global, reference-counted allocator is now created at JITServer
clients that is used to allocate the memory used by the internal
MessageBuffer storage buffer during client/server communication.
This allocator's memory segments are disclaimed if the number of
connections to the server drops to zero, and the compiler will also
periodically attempt to destroy the allocator entirely.

Signed-off-by: Christian Despres <[email protected]>
@cjjdespres cjjdespres force-pushed the disclaim-free-message-buffer branch from 9c1fac9 to 5c98d28 Compare July 7, 2024 00:34
@cjjdespres
Copy link
Contributor Author

That should be fixed.

@mpirvu
Copy link
Contributor

mpirvu commented Jul 7, 2024

jenkins test sanity xlinuxjit,zlinuxjit,alinux64jit jdk21

@mpirvu mpirvu merged commit f3dc638 into eclipse-openj9:master Jul 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants