Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8230305 Cgroups v2: Container awareness
  3. JDK-8230848

OSContainer: Refactor container detection code

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Withdrawn
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      linux

      Description

      Currently some OSContainer functions use direct CGroup V1 implementation details. This should be made more agnostic so as to accommodate for a future CGroup V2-based implementation (See JDK-8230305).

      The proposal is dispatch to cgroup version agnostic implementations for the following functions:

        static const char * container_type();
        static jlong memory_limit_in_bytes();
        static jlong memory_and_swap_limit_in_bytes();
        static jlong memory_soft_limit_in_bytes();
        static jlong memory_usage_in_bytes();
        static jlong memory_max_usage_in_bytes();
        static char * cpu_cpuset_cpus();
        static char * cpu_cpuset_memory_nodes();
        static int cpu_quota();
        static int cpu_period();
        static int cpu_shares();

      This would allow for support for cgroup v2 without actually changing OSContainer code for those functions.

        Attachments

          Activity

            People

            Assignee:
            sgehwolf Severin Gehwolf
            Reporter:
            sgehwolf Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: