kubelet/cm: speed up cgroup creation
There's no need to call m.Update (which will create another instance of libcontainer cgroup manager, convert all the resources and then set them). All this is already done here, except for Set(). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -534,7 +534,7 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error {
|
||||
|
||||
// it may confuse why we call set after we do apply, but the issue is that runc
|
||||
// follows a similar pattern. it's needed to ensure cpu quota is set properly.
|
||||
if err := m.Update(cgroupConfig); err != nil {
|
||||
if err := manager.Set(resources); err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("cgroup update failed %v", err))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user