Skip to content

Commit 15ef4c3

Browse files
anastopdgiantsidi
authored andcommitted
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 <[email protected]>
1 parent c755602 commit 15ef4c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cpuset.go

Lines changed: 4 additions & 0 deletions
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)