On Wed, 21 Feb 2024 13:37:22 GMT, Jan Kratochvil <jkratoch...@openjdk.org> 
wrote:

> > One goal of this patch would be to unify how this works for cgroup v1 and 
> > cgroup v2.
> 
> That is not much possible anyway as currently cgroup2 has to traverse the 
> directories while after the kernel patch gets accepted it will be faster 
> using the new kernel interface.

I think it should be using the "on-init traversal approach" for both.


>>    Point 1.) seems orthogonal to this patch, but I'm not sure I understand 
>> what it's about to begin with...
>
>With current JDK if you set limits 1GB for memory:foo, 2GB for memory:foo/bar 
>and you run a process in memory:foo/bar JDK will think the limit is 2GB 
>despite the kernel will enforce a limit of 1GB.

I'm surprised that the hierarchical memory limit look-up wouldn't see it for 
v1. Either way, using the traversal approach you'd see that `foo/bar` has `2 
GB`, when traversing up the hierarchy you'd see `1 GB` for `foo` and use that 
as it's less than the earlier value. So would be covered by this fix? What am I 
missing?

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

PR Comment: https://git.openjdk.org/jdk/pull/17198#issuecomment-1956719869

Reply via email to