File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -1753,18 +1753,12 @@ enter_systemd_cgroup_scope (runtime_spec_schema_config_linux_resources *resource
17531753
17541754 i = 0 ;
17551755 boolean_opts [i ++ ] = "Delegate" ;
1756- if (resources )
1757- {
1758- if (resources -> cpu )
1759- boolean_opts [i ++ ] = "CPUAccounting" ;
1760- if (resources -> memory )
1761- boolean_opts [i ++ ] = "MemoryAccounting" ;
1762- if (resources -> block_io )
1763- boolean_opts [i ++ ] = "IOAccounting" ;
1764- }
1765- /* Always enable TasksAccounting to ensure the pids controller is available.
1766- * This allows container managers to read pids.current even when no explicit
1767- * pids limit is set. */
1756+
1757+ /* Always enable all accounting to ensure stats are readable even
1758+ * without resource limits. */
1759+ boolean_opts [i ++ ] = "CPUAccounting" ;
1760+ boolean_opts [i ++ ] = "MemoryAccounting" ;
1761+ boolean_opts [i ++ ] = "IOAccounting" ;
17681762 boolean_opts [i ++ ] = "TasksAccounting" ;
17691763 boolean_opts [i ++ ] = NULL ;
17701764
You can’t perform that action at this time.
0 commit comments