RFR: 8262953: [TESTBUG] Test /runtime/containers/cgroup/PlainRead.java fails if CPU quoata is not enabled

David Holmes david.holmes at oracle.com
Fri Apr 16 02:32:40 UTC 2021


On 16/04/2021 12:28 pm, Yasumasa Suenaga wrote:
> On Thu, 25 Mar 2021 20:11:30 GMT, Anton Ostrouhhov <github.com+22177208+aostrouhhov at openjdk.org> wrote:
> 
>> Hello!
>> Both _CPU Quota_ and _CPU Period_ are missing from output if kernel was built without `CONFIG_CFS_BANDWIDTH`.
>>
>> This is my first contribution so please tell me if i am wrong somewhere.
> 
> I agree with David, I think we should throw SkipException in this case.

That is not at all what I was suggesting. :) Rather than fixing the test 
I think our cgroup support code needs to be updated to account for this 
situation.

David

> OTOH this test can catch incorrect behavior if HotSpot could not get CPU related values from cgroups even if `CONFIG_CFS_BANDWIDTH` is configured. So I suggest to check `/boot/config-<kernel version>` in start of the test rather than throwing SkipException. If we cannot see `CONFIG_CFS_BANDWIDTH=y` in it, then we can throw SkipException.
> 
> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/3206
> 


More information about the hotspot-runtime-dev mailing list