2020-02-22 21:26:13 +01:00
|
|
|
--- ./libcontainer/cgroups/fs/cpuset.go.orig 2020-01-22 17:19:15.000000000 +0100
|
|
|
|
+++ ./libcontainer/cgroups/fs/cpuset.go 2020-02-22 21:17:22.474879849 +0100
|
|
|
|
@@ -32,12 +32,12 @@
|
2019-07-14 14:33:33 +02:00
|
|
|
|
|
|
|
func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error {
|
|
|
|
if cgroup.Resources.CpusetCpus != "" {
|
2020-02-22 21:26:13 +01:00
|
|
|
- if err := fscommon.WriteFile(path, "cpuset.cpus", cgroup.Resources.CpusetCpus); err != nil {
|
|
|
|
+ if err := fscommon.WriteFile(path, "cpus", cgroup.Resources.CpusetCpus); err != nil {
|
2019-07-14 14:33:33 +02:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if cgroup.Resources.CpusetMems != "" {
|
2020-02-22 21:26:13 +01:00
|
|
|
- if err := fscommon.WriteFile(path, "cpuset.mems", cgroup.Resources.CpusetMems); err != nil {
|
|
|
|
+ if err := fscommon.WriteFile(path, "mems", cgroup.Resources.CpusetMems); err != nil {
|
2019-07-14 14:33:33 +02:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
2020-02-22 21:26:13 +01:00
|
|
|
@@ -89,10 +89,10 @@
|
2019-07-14 14:33:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *CpusetGroup) getSubsystemSettings(parent string) (cpus []byte, mems []byte, err error) {
|
|
|
|
- if cpus, err = ioutil.ReadFile(filepath.Join(parent, "cpuset.cpus")); err != nil {
|
|
|
|
+ if cpus, err = ioutil.ReadFile(filepath.Join(parent, "cpus")); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
- if mems, err = ioutil.ReadFile(filepath.Join(parent, "cpuset.mems")); err != nil {
|
|
|
|
+ if mems, err = ioutil.ReadFile(filepath.Join(parent, "mems")); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return cpus, mems, nil
|
2020-02-22 21:26:13 +01:00
|
|
|
@@ -136,12 +136,12 @@
|
2019-07-14 14:33:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if s.isEmpty(currentCpus) {
|
2020-02-22 21:26:13 +01:00
|
|
|
- if err := fscommon.WriteFile(current, "cpuset.cpus", string(parentCpus)); err != nil {
|
|
|
|
+ if err := fscommon.WriteFile(current, "cpus", string(parentCpus)); err != nil {
|
2019-07-14 14:33:33 +02:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.isEmpty(currentMems) {
|
2020-02-22 21:26:13 +01:00
|
|
|
- if err := fscommon.WriteFile(current, "cpuset.mems", string(parentMems)); err != nil {
|
|
|
|
+ if err := fscommon.WriteFile(current, "mems", string(parentMems)); err != nil {
|
2019-07-14 14:33:33 +02:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|