Skip to content
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

libct/cgroups/fs: rework Apply() #2500

Merged
merged 1 commit into from
Jul 30, 2020
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jul 3, 2020

this is separated out from #2438 in order to make review easier

In manager.Apply() method, a path to each subsystem is obtained by
calling d.path(sys.Name()), and the sys.Apply() is called that does
the same call to d.path() again.

d.path() is an expensive call, so rather than to call it twice, let's
reuse the result.

This results the number of times we parse mountinfo during container
start from 62 to 34 on my setup.

@kolyshkin kolyshkin changed the title libct/cgroup/fs: rework Apply() libct/cgroups/fs: rework Apply() Jul 3, 2020
@AkihiroSuda
Copy link
Member

needs rebase

In manager.Apply() method, a path to each subsystem is obtained by
calling d.path(sys.Name()), and the sys.Apply() is called that does
the same call to d.path() again.

d.path() is an expensive call, so rather than to call it twice, let's
reuse the result.

This results the number of times we parse mountinfo during container
start from 62 to 34 on my setup.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

Rebased to resolve a conflict caused by #2490 being merged.

@mrunalp mrunalp merged commit 46243fc into opencontainers:master Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants