mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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:
parent
f10cd679eb
commit
a673b64864
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user