libcontainer/intelrdt: IntelRdtManager refactoring#2653
libcontainer/intelrdt: IntelRdtManager refactoring#2653AkihiroSuda merged 2 commits intoopencontainers:masterfrom
Conversation
Introduce NewManager() to wrap up IntelRdtManager initialization. And call it when required. Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
No functional change. Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
|
@kolyshkin @AkihiroSuda @Creatone |
|
@xiaochenshen Can it wait till Monday? I'm on holidays now. |
@Creatone No problem. Thank you for help! 😃 |
This is in preparation to the upcoming rc93 release, to make sure nothing will be broken by it. One change is required due to changes in intelrdt (see opencontainers/runc#2653). Brought to you (mostly) by go get github.com/opencontainers/runc@master make tidy Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
This broke cadvisor but the fix is trivial (google/cadvisor@48e7375#diff-c1ad83c3e8484f4f134e3fb0eff9666f7b19db23d0c20bd5476920ff1bcd9709) By the way @xiaochenshen @Creatone why do we have to specify empty config, like this: mgr := intelrdt.NewManager(&configs.Config{IntelRdt: &configs.IntelRdt{}}, id, resctrlPath)Can we do something like func NewManager(config *configs.Config, id string, path string) Manager {
if config == nil {
config = &configs.Config{IntelRdt: &configs.IntelRdt{}}
}
return &intelRdtManager{
config: config,
id: id,
path: path,
}
}or it does not make any sense? |
@kolyshkin Thank you for fixing this.
@kolyshkin The reason why we have to specify empty config: runc/libcontainer/intelrdt/intelrdt.go Lines 587 to 591 in 27227a9 special case in See the code and comment here: Lines 310 to 328 in 27227a9
Yes. I think so.
Maybe:
|
This is in preparation to the upcoming rc93 release, to make sure nothing will be broken by it. One change is required due to changes in intelrdt (see opencontainers/runc#2653). Brought to you (mostly) by go get github.com/opencontainers/runc@master make tidy Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is a set of patches for IntelRdtManager refactoring.
It is similar to part of the cgroup refactoring in #2387.
No functional change.
Please review commits one by one.
Signed-off-by: Xiaochen Shen xiaochen.shen@intel.com