On Tue, 12 Jan 2021 14:29:28 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

> Anybody willing to review this?

I can have a go.

I have two main concerns:

1. There seems to be little documentation on the new additions. I'm 
particularly concerned about things like CgroupV1Subsystem.java where a big 
chunk of documentation on the formats being read is removed and I don't see it 
being moved elsewhere. Documentation on the new getInstance methods would be 
helpful too.
2. With the new volatile fields, I think it would be better if the lock being 
held to initialise them was only held when necessary to perform the assignment. 
Holding it while performing an extensive process of parsing multiple files that 
could potentially fail seems a little dangerous. i.e. something like:
if (INSTANCE == null) { CGroupV1Subsystem tmp = initSubSystem(infos); 
synchronized (CgroupV1Subsystem.class) { if (INSTANCE == null) { INSTANCE = 
tmp; } } }

-------------

PR: https://git.openjdk.java.net/jdk/pull/1393

Reply via email to