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
| @@ -1,4 +1,4 @@ | |||
| FROM golang:1.12-stretch | |||
| FROM golang:1.14-stretch | |||
There was a problem hiding this comment.
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.
1.14 has breaking changes on SIGURG&EINTR stuff https://golang.org/doc/go1.14#runtime
AkihiroSuda
left a comment
There was a problem hiding this comment.
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 |
| script: | ||
| - make verify-dependencies | ||
| - go: 1.12.x | ||
| - go: stable |
There was a problem hiding this comment.
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.
We aren't ready for 1.14 yet
There was a problem hiding this comment.
this is CI only and it passes.
OK I'll switch to explicitly 1.13
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 runcommand reads mountinfo from from 72 to 116 times (depending on whether--systemd-cgroupis set) on my system.This PR
libcontainer/mountmountinfo 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