-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add memory policy support #4726
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
Conversation
66df434
to
cde25df
Compare
@AkihiroSuda, @giuseppe, do you think it would be good to keep this PR as Draft until opencontainers/runtime-spec#1282 is merged? Or should I make it Ready for review (despite the "replace" in go.mod) in order to get reviews and possibly get this tagged into v1.3? |
Please keep this draft until the runtime spec PR gets merged |
26ab8a1
to
3bb9611
Compare
22c31a6
to
e5dca5d
Compare
@AkihiroSuda, as the memory policy field is now in place in the runtime-spec (opencontainers/runtime-spec#1282 merged), I updated this PR to use the latest runtime-spec and removed the Draft status. Rebased and fixed lint issues. Good for review now. :) |
Careful with the milestones. According to the new release policy, features should by merged by rc1, which is due by the end of the month. |
Yes, please remove this commit. The CI is fully passing in #4900. |
1b32673
to
0ef29ce
Compare
Removed. |
@askervin somewhat related to this PR; can you please review https://go-review.googlesource.com/c/sys/+/706917/2? |
Could you please help fix the lint errors?
|
@lifubang, I fixed these errors with this commit: 1b32673 The root cause is that CI runs the staticcheck lint twice, first without and then with ST1003. The first run checks all the code, the latter check only changed parts. If I disable this in code (nolint), I'll get an error from the first run: you're disabling a check without a reason. If I don't disable it, I'll get the errors quoted above. Options that I see are:
Of course there may be more options that I just fail to see. What would you suggest? |
In fact, we always use |
188a282
to
a00a175
Compare
@lifubang, A side note: ALL_CAPS C header constants in the runc code base do exist, like in libcontainer/configs/{mount.go,namespaces_linux.go}. And if we'd like to enable ST1003 in the first pass, we would also need to fix ALL_CAPS internal constants in utils_linux.go:
However, fixing (or nolinting) ALL_CAPS cases would not suffice, as ST1003 wants few other naming changes, too. Like "id"s capitalized (like ttyUid -> ttyUID), but that's another story. |
The |
Implement support for Linux memory policy in OCI spec PR: opencontainers/runtime-spec#1282 Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
a00a175
to
eda7bdf
Compare
This has 3 reviews, so I'm happy to merge it. @askervin Did you still want this in runc 1.4? @kolyshkin @AkihiroSuda @lifubang Would you be happy for us to add this in rc2, or do you want to push this for 1.5 in April? |
I think having it in v1.4 is fine since it's a new functionality and the chance it will bring a regression is minimal. |
Sure, @cyphar! Glad to see the functionality already in v1.4. Thanks for all the great comments, @AkihiroSuda, @lifubang, @cyphar and @kolyshkin! |
Implement support for Linux memory policy in OCI spec PR: opencontainers/runtime-spec#1282