mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8284950: CgroupV1 detection code should consider memory.swappiness
Reviewed-by: sgehwolf, iklam
This commit is contained in:
parent
e2448cee57
commit
46d208fb1c
4 changed files with 142 additions and 5 deletions
|
@ -150,8 +150,9 @@ public class CgroupV1Subsystem implements CgroupSubsystem, CgroupV1Metrics {
|
|||
}
|
||||
|
||||
private static boolean getSwapEnabled(CgroupV1MemorySubSystemController controller) {
|
||||
long retval = getLongValue(controller, "memory.memsw.limit_in_bytes");
|
||||
return retval > 0;
|
||||
long memswBytes = getLongValue(controller, "memory.memsw.limit_in_bytes");
|
||||
long swappiness = getLongValue(controller, "memory.swappiness");
|
||||
return (memswBytes > 0 && swappiness > 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue