Skip to content

Commit 15ef4c3

Browse files
anastopdgiantsidi
authored andcommittedApr 4, 2018
Add Update method for the cpuset controller
So that the CPUs and memory nodes of a cgroup can be dynamically changed. Signed-off-by: Nikos Anastopoulos <n.anastop@gmail.com>
1 parent c755602 commit 15ef4c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎cpuset.go

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ func (c *cpusetController) Create(path string, resources *specs.LinuxResources)
8282
return nil
8383
}
8484

85+
func (c *cpusetController) Update(path string, resources *specs.LinuxResources) error {
86+
return c.Create(path, resources)
87+
}
88+
8589
func (c *cpusetController) getValues(path string) (cpus []byte, mems []byte, err error) {
8690
if cpus, err = ioutil.ReadFile(filepath.Join(path, "cpuset.cpus")); err != nil && !os.IsNotExist(err) {
8791
return

0 commit comments

Comments
 (0)