-
Notifications
You must be signed in to change notification settings - Fork 2.2k
libcontainer/intelrdt: IntelRdtManager refactoring #2653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcontainer/intelrdt: IntelRdtManager refactoring #2653
Conversation
Introduce NewManager() to wrap up IntelRdtManager initialization. And call it when required. Signed-off-by: Xiaochen Shen <[email protected]>
No functional change. Signed-off-by: Xiaochen Shen <[email protected]>
|
@kolyshkin @AkihiroSuda @Creatone |
|
@xiaochenshen Can it wait till Monday? I'm on holidays now. |
@Creatone No problem. Thank you for help! 😃 |
Creatone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
kolyshkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 <[email protected]>
|
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 <[email protected]>
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 [email protected]