Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-25 Thread Ioi Lam
On Tue, 24 May 2022 19:36:57 GMT, Severin Gehwolf wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @jerboaa comments > > Looks good. Thanks for the thorough analysis. Thanks @jerboaa and @mseledts for the review. -

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v4]

2022-05-25 Thread Ioi Lam
> This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have simultaneously > mounted v1 and v2 containers. If so, we revert to "hybrid"

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
On Wed, 25 May 2022 15:50:32 GMT, Severin Gehwolf wrote: >> It confused me, fwiw. Anyway up to you. It's not super important. > > works for me. +1. Note the typo > `anyCgroupsV1Controller/anyCgroupsV2Controller` not **V1** twice. Oops, I'll fixed that. Thanks! - PR: https://git.op

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Severin Gehwolf
On Wed, 25 May 2022 15:51:04 GMT, Ioi Lam wrote: >> This PR fixes a bug found on an Ubuntu host that's mostly running with >> cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 >> mode. >> >> The container support code in the VM and JDK checks if we have >> simultaneousl

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
> This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have simultaneously > mounted v1 and v2 containers. If so, we revert to "hybrid"

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Severin Gehwolf
On Wed, 25 May 2022 08:40:48 GMT, Severin Gehwolf wrote: >> If you don't like the `default:` coding style, how about this: >> >> >> switch (info.getName()) { >> // Only the following controllers are important to Java. All >> // other controllers (such as freezer) are ignored and >> // are not c

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v3]

2022-05-25 Thread Ioi Lam
On Tue, 24 May 2022 19:49:35 GMT, Ioi Lam wrote: >> My bad. How about `Intentional incomplete switch. There are ...`? Anyway, >> why is the empty `default` case needed other than for the comment? > > To me, the `default:` switch is a clear indication that "everything else > comes here". So you

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-25 Thread Severin Gehwolf
On Tue, 24 May 2022 19:49:35 GMT, Ioi Lam wrote: >> My bad. How about `Intentional incomplete switch. There are ...`? Anyway, >> why is the empty `default` case needed other than for the comment? > > To me, the `default:` switch is a clear indication that "everything else > comes here". So you

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
On Tue, 24 May 2022 19:34:16 GMT, Severin Gehwolf wrote: >> This is not a fall-through because the previous line ends with a `break`. > > My bad. How about `Intentional incomplete switch. There are ...`? Anyway, why > is the empty `default` case needed other than for the comment? To me, the `de

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Severin Gehwolf
On Tue, 24 May 2022 16:09:54 GMT, Ioi Lam wrote: >> src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java >> line 155: >> >>> 153: // There are some controllers (such as freezer) that >>> Java doesn't >>> 154: // care about. Just ignore t

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Severin Gehwolf
On Tue, 24 May 2022 16:15:03 GMT, Ioi Lam wrote: >> This PR fixes a bug found on an Ubuntu host that's mostly running with >> cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 >> mode. >> >> The container support code in the VM and JDK checks if we have >> simultaneousl

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
On Tue, 24 May 2022 10:12:31 GMT, Severin Gehwolf wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @jerboaa comments > > src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java > line 155: > >> 15

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller [v2]

2022-05-24 Thread Ioi Lam
> This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have simultaneously > mounted v1 and v2 containers. If so, we revert to "hybrid"

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller

2022-05-24 Thread Severin Gehwolf
On Mon, 23 May 2022 22:11:47 GMT, Ioi Lam wrote: > This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have simultaneously > mounted

Re: RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller

2022-05-23 Thread Mikhailo Seledtsov
On Mon, 23 May 2022 22:11:47 GMT, Ioi Lam wrote: > This PR fixes a bug found on an Ubuntu host that's mostly running with > cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. > > The container support code in the VM and JDK checks if we have simultaneously > mounted

RFR: 8287107: CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller

2022-05-23 Thread Ioi Lam
This PR fixes a bug found on an Ubuntu host that's mostly running with cgroupv2, but there's a controller (freezer) that is mounted in cgroupv1 mode. The container support code in the VM and JDK checks if we have simultaneously mounted v1 and v2 containers. If so, we revert to "hybrid" mode (whi