Skip to content

Commit

Permalink
Add Update method for the cpuset controller
Browse files Browse the repository at this point in the history
So that the CPUs and memory nodes of a cgroup can be dynamically changed.

Signed-off-by: Nikos Anastopoulos <n.anastop@gmail.com>
  • Loading branch information
anastop authored and dgiantsidi committed Apr 4, 2018
1 parent c755602 commit 15ef4c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpuset.go
Expand Up @@ -82,6 +82,10 @@ func (c *cpusetController) Create(path string, resources *specs.LinuxResources)
return nil
}

func (c *cpusetController) Update(path string, resources *specs.LinuxResources) error {
return c.Create(path, resources)
}

func (c *cpusetController) getValues(path string) (cpus []byte, mems []byte, err error) {
if cpus, err = ioutil.ReadFile(filepath.Join(path, "cpuset.cpus")); err != nil && !os.IsNotExist(err) {
return
Expand Down

0 comments on commit 15ef4c3

Please sign in to comment.