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/GetCgroupRoot: make it faster #2507

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

kolyshkin
Copy link
Contributor

...by checking the default path first.

Quick benchmark shows it's about 5x faster on an idle system, and the
gain should be much more on a system doing mounts etc.

This is an alternative to #2497. I don't like it much because it adds code rather than removes it.

@kolyshkin
Copy link
Contributor Author

CI failure (in checkpoint --lazy-pages) looks unrelated, but the cascade of errors after it failed led me to PR #2509.

@kolyshkin
Copy link
Contributor Author

CI restarted. The failure was

303612 checkpoint --lazy-pages and restore
3037# (from function `__runc' in file tests/integration/helpers.bash, line 57,
3038#  in test file tests/integration/checkpoint.bats, line 182)
3039#   `__runc --criu "$CRIU" restore -d --work-path ./image-dir --image-path ./image-dir --lazy-pages test_busybox_restore <&60 >&51 2>&51' failed
3040# runc list (status=0):
3041# ID          PID         STATUS      BUNDLE      CREATED     OWNER
3042# runc spec (status=0):
3043# 
3044# runc state test_busybox (status=0):
3045# {
3046#   "ociVersion": "1.0.2-dev",
3047#   "id": "test_busybox",
3048#   "pid": 3993,
3049#   "status": "running",
3050#   "bundle": "/tmp/busyboxtest",
3051#   "rootfs": "/tmp/busyboxtest/rootfs",
3052#   "created": "2020-07-07T04:09:18.881675684Z",
3053#   "owner": ""
3054# }
3055# Warn  (criu/kerndat.c:869): Can't keep kdat cache on non-tempfs
3056# runc list (status=0):
3057# ID             PID         STATUS      BUNDLE             CREATED                          OWNER
3058# test_busybox   3993        running     /tmp/busyboxtest   2020-07-07T04:09:18.881675684Z   root
3059# runc kill test_busybox KILL (status=0):
3060# 
3061# runc delete test_busybox (status=0):
3062# 

...by checking the default path first.

Quick benchmark shows it's about 5x faster on an idle system, and the
gain should be much more on a system doing mounts etc.

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

@AkihiroSuda @mrunalp PTAL

@AkihiroSuda AkihiroSuda merged commit d6f5641 into opencontainers:master Jul 31, 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