-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use faster mountinfo parser (part 1) #2256
Conversation
527fa7e
to
79f1207
Compare
This is failing because we still use golang 1.12 :( |
79f1207
to
6322359
Compare
Dockerfile
Outdated
@@ -1,4 +1,4 @@ | |||
FROM golang:1.12-stretch | |||
FROM golang:1.14-stretch |
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.
Why 1.14?
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.
Either 1.13 or 1.14 should work just fine. As 1.13 will eventually be unsupported, I'm jumping straight to 1.14. Can use 1.13 as well here, let me know if you want it that way.
Ideally we should merge #2239 first and just rebase this one on top of it, but it's still marked as draft by @thaJeztah.
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.
1.14 has breaking changes on SIGURG
&EINTR
stuff https://golang.org/doc/go1.14#runtime
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.
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.
Please roll back to go 1.13
6322359
to
27ab232
Compare
done |
@opencontainers/runc-maintainers PTAL |
IDK what's going on on travis, it doesn't like My laptop:
Travis:
Anyway I'll just use |
83bb000
to
2ae97a2
Compare
Some glitch in CI, rebasing to re-trigger it
|
CI is good now, was a glitch |
.travis.yml
Outdated
name: "verify-dependencies" | ||
script: | ||
- make verify-dependencies | ||
- go: 1.12.x | ||
- go: stable |
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.
stable -> 1.13.x ?
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.
No, currently stable
means 1.14.x. I didn't want to use an explicit version here since it will need to be changed every once in a while, but an implicit version like stable
can stay as is.
Do you want it to be explicit?
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.
We aren't ready for 1.14 yet
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.
this is CI only and it passes.
OK I'll switch to explicitly 1.13
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.
updated
Run CI with go 1.13 and 1.14 (aka "stable"). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Delete libcontainer/mount in favor of github.com/moby/sys/mountinfo, which is fast mountinfo parser. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. rootfs is already validated to be kosher by (*ConfigValidator).rootfs() 2. mount points from /proc/self/mountinfo are absolute and clean, too Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2ae97a2
to
dd7b346
Compare
@crosbymichael @cyphar @giuseppe ptal. |
@mrunalp Can we merge this, or do you want one more LGTM? |
Make use of errors.Is() and errors.As() where appropriate to check the underlying error. The biggest motivation is to simplify the code. The feature requires go 1.13 but since merging opencontainers#2256 we are already not supporting go 1.12 (which is an unsupported release anyway). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is part 1 of improving runc wrt /proc/self/mountinfo parsing (and an alternative to #2255).
It needs improvements because:
runc run
command reads mountinfo from from 72 to 116 times (depending on whether--systemd-cgroup
is set) on my system.This PR
libcontainer/mount
mountinfo parser (which was taken from Docker in Nov 2017)The new parser itself is up to 8x faster than the one removed; in addition, it implements mountinfo filters that may result in additional savings (faster, less garbage to collect).
History
My future plans (not in this PR) are