-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8365606: Container code should not be using jlong/julong #27743
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Testing details:cgroup v2 F42 (docker):
cgroup v2 F39 (docker):
cgroup v1 RHEL 8 (podman):
Note: The skipped test on RHEL 8 is |
/label add hotspot-jfr |
@jerboaa |
GHA test failure on Windows x64 is unrelated (this is a Linux only patch): |
There seems to be some collision here with JDK-8367319 |
Thanks, yes, I'm aware. We'll resolve conflicts once we know which one goes in first. |
Please review this revised version of getting rid of
jlong
andjulong
in internal HotSpot code. The single remaining usage is usingos::elapsed_counter()
which I think is still ok. This refactoring is for the container detection code to (mostly) do away with negative return values.It gets rid of the trifold-use of return value: 1.) error, 2) unlimited values 3) actual numbers/values/limits. Instead, all container related values are now being read from the interface files as
uint64_t
and afterwards interpreted in the way that make sense for the API implementations. For example,cpu
values will essentially be treated asint
s as before, potentially returning a negative value-1
for unlimited. For memory sizes the typephysical_memory_size_type
has been chosen. When there is no limit for a specific memory size a valuevalue_unlimited
is being returned.All error cases have been changed to returning
false
in the API functions (and no value is being set in the passed in reference for the value). The effect of this is that all container related functions now return abool
and require a reference to be passed in for thevalue
that is being asked for.All usages of the API have been changed to use the revised API. There is no more usages for
OSCONTAINER_ERROR
(`-2) in HotSpot code.While working on this, I've noticed that there are still some calls deep in the cgroup subsystem code to query "machine" info (e.g.
os::Linux::active_processor_count()
). I've filed JDK-8369503 to get this cleaned-up as this patch was already getting large.Testing (looking good):
jdk.SwapSpace
event) andVM.info
diagnostic command.Thoughts? Opinions?
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27743/head:pull/27743
$ git checkout pull/27743
Update a local copy of the PR:
$ git checkout pull/27743
$ git pull https://git.openjdk.org/jdk.git pull/27743/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27743
View PR using the GUI difftool:
$ git pr show -t 27743
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27743.diff
Using Webrev
Link to Webrev Comment