Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <ahmad@gitlab.com>2022-03-24 16:03:45 +0300
committerAhmad Sherif <me@ahmadsherif.com>2022-03-24 16:10:26 +0300
commit57d2cc329bf5a5efe9d80f748ae102545c7ba2ff (patch)
tree09cb81d98db1742929ef812aebf47393259464e6
parente302aa4a8caf07caad38c236d610fea49a41aa2f (diff)
cgroups: Allow stats to be collected in absence of memsw.* entries
Otherwise, we get errors such as `open /sys/fs/cgroup/memory/gitaly/gitaly-1/memory.memsw.usage_in_bytes: no such file or directory`. Changelog: fixed
-rw-r--r--internal/cgroups/v1_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cgroups/v1_linux.go b/internal/cgroups/v1_linux.go
index e524d7609..d98a75807 100644
--- a/internal/cgroups/v1_linux.go
+++ b/internal/cgroups/v1_linux.go
@@ -181,7 +181,7 @@ func (cg *CGroupV1Manager) currentProcessCgroup() string {
func defaultSubsystems(root string) ([]cgroups.Subsystem, error) {
subsystems := []cgroups.Subsystem{
- cgroups.NewMemory(root),
+ cgroups.NewMemory(root, cgroups.OptionalSwap()),
cgroups.NewCpu(root),
}