Skip to content

Commit

Permalink
8252957: Wrong comment in CgroupV1Subsystem::cpu_quota
Browse files Browse the repository at this point in the history
The comment is wrong. The 'us' in 'cpu.cfs_quota_us' stands for
microseconds, which is read verbatim. Similarly for cgroups v2
all units in 'cpu.max' are in microseconds.

Backport-of: 5166094647f8bfae32ef4bbde2e40f68e073b595
  • Loading branch information
Jonathan Dowland committed Dec 16, 2022
1 parent d039c8d commit 0662db2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hotspot/src/os/linux/vm/cgroupV1Subsystem_linux.cpp
Expand Up @@ -212,11 +212,11 @@ char * CgroupV1Subsystem::cpu_cpuset_memory_nodes() {

/* cpu_quota
*
* Return the number of milliseconds per period
* Return the number of microseconds per period
* process is guaranteed to run.
*
* return:
* quota time in milliseconds
* quota time in microseconds
* -1 for no quota
* OSCONTAINER_ERROR for not supported
*/
Expand Down
4 changes: 2 additions & 2 deletions hotspot/src/os/linux/vm/cgroupV2Subsystem_linux.cpp
Expand Up @@ -82,11 +82,11 @@ int CgroupV2Subsystem::cpu_shares() {

/* cpu_quota
*
* Return the number of milliseconds per period
* Return the number of microseconds per period
* process is guaranteed to run.
*
* return:
* quota time in milliseconds
* quota time in microseconds
* -1 for no quota
* OSCONTAINER_ERROR for not supported
*/
Expand Down

1 comment on commit 0662db2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.