Conversation
7668ea8 to
0da66e4
Compare
electrum
left a comment
There was a problem hiding this comment.
We definitely do not want to add OSHI as a dependency here. Can we do this in pure Java, such as by reading /proc/cpuinfo?
|
@electrum can I make it optional with the default being a /proc/cpuinfo based? |
|
Optional dependencies are a pain. How do you test that the fallback works? You need a different test suite that doesn’t have the optional dependency on the classpath. The question is if we can get this from Java without needing a native dependency. If no, then we can evaluate options. If yes, then why make it optional? |
|
@electrum Sure. I'll implement it without deps. Thanks for guidance! |
48da75b to
14c5638
Compare
|
@electrum ptal |
8e9df4f to
a7ff0ff
Compare
|
Tested in docker on arm64: |
a7ff0ff to
9b40e65
Compare
293491a to
b68eea2
Compare
|
@electrum all of your comments are addressed now |
b68eea2 to
0645461
Compare
|
I've fixed the compilation error on JDK 11 (the last working airlift version is 219, 220 was switched to JDK 17) |
|
@sopel39 ptal |
7d0e6d4 to
4c572f7
Compare
4c572f7 to
0ac0845
Compare
electrum
left a comment
There was a problem hiding this comment.
Let's drop the @PowerOfTwo validator. If we're going to do the clamping in the caller, then it doesn't make sense to have this validator. Also, it wouldn't work with ThreadCount since that isn't an integer.
relative to the number of physical CPUs. On ARM64 and non-linux systems this is resolved using java's Runtime. For AMD64 on Linux /proc/cpuinfo is parsed to detect number of physical CPUs. Both implementations are container-aware and will return the number of requested CPUs if specified for the container.
0ac0845 to
5442f37
Compare
|
@electrum PTAL. Rebased and addressed all comments. I've added |
No description provided.