Skip to content

Commit 0662db2

Browse files
author
Jonathan Dowland
committedDec 16, 2022
8252957: Wrong comment in CgroupV1Subsystem::cpu_quota
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
1 parent d039c8d commit 0662db2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎hotspot/src/os/linux/vm/cgroupV1Subsystem_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ char * CgroupV1Subsystem::cpu_cpuset_memory_nodes() {
212212

213213
/* cpu_quota
214214
*
215-
* Return the number of milliseconds per period
215+
* Return the number of microseconds per period
216216
* process is guaranteed to run.
217217
*
218218
* return:
219-
* quota time in milliseconds
219+
* quota time in microseconds
220220
* -1 for no quota
221221
* OSCONTAINER_ERROR for not supported
222222
*/

‎hotspot/src/os/linux/vm/cgroupV2Subsystem_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ int CgroupV2Subsystem::cpu_shares() {
8282

8383
/* cpu_quota
8484
*
85-
* Return the number of milliseconds per period
85+
* Return the number of microseconds per period
8686
* process is guaranteed to run.
8787
*
8888
* return:
89-
* quota time in milliseconds
89+
* quota time in microseconds
9090
* -1 for no quota
9191
* OSCONTAINER_ERROR for not supported
9292
*/

0 commit comments

Comments
 (0)
Please sign in to comment.