Repository navigation
Add support for kernel memory limit - #14006
Conversation
|
It needs docker-archive/libcontainer#637 to be merged first. |
|
LGTM (if my vote counts at all :)) |
|
Would it make sense at all to set a kmem based on whatever I think |
|
@cpuguy83 I agree that I don't understand how can you vote against a different flag while agree that |
|
I definitely did not -1 the flag... I would just prefer that --memory does what people expect it to do in the default case. |
|
@cpuguy83 We can set kmem a default value based on what
So I think introduce a new option would be necessary. |
|
ping |
|
After discussing with @mrjana, here are our thoughts:
Other than that we're fine with it. |
|
@tiborvass What do you mean about I think different OS have different support on resource controls, it's inevitable, all we can do is to adapt these OS and make sure nothing bad would happen when we use these configs, the difference is wether they really work or not, or show some specific messages. WDYT? |
|
@tiborvass I think it would cause more confusing to make an non-typesafe flag at this point. There are not limits on the number of flags that you have an consistency with the existing data should be considered. |
|
Collective review @calavera @duglin @tonistiigi @jfrazelle We seem to agree we shouldn't hold this PR because of how we want to handle platform-specific settings in the future. However, that concern has to be solved in some ways for that reason I opened #15374 @hqhq please rebase :) |
d67ec32 to
a36598b
Compare
|
@tiborvass Rebased, thanks. |
There was a problem hiding this comment.
Should we just warn here? Is the fix for this not ever going to be backported?
There was a problem hiding this comment.
You mean fix in kernel? Actually it's not a bug, but a feature, support kernel memory reclaim so kernel memory limit is actually usable. I don't think it'll be backported to older kernel.
In kernel doc, kernel memory limit is an experimental feature before 4.0, maybe we can just warn here, to both daemon and client.
a36598b to
24fc467
Compare
|
@cpuguy83 Updated, thanks. |
There was a problem hiding this comment.
discard means to throw away. Do you mean ignored? It looks like the user specified a limit for a kernel that does not support memory limits.
"You specified a memory limit which will is ignored because your kernel does not have memory limit capabilities."
There was a problem hiding this comment.
hi @moxiegirl This description was trying to be constant with other warnings in this function, if they were not good enough, maybe we can pull an separate request and change them all in once?
There was a problem hiding this comment.
I understand. Your choice of course...
|
@thaJeztah @moxiegirl thanks for your review, will address your comments soon, in ContainerCon now. |
fefad09 to
916883a
Compare
|
@thaJeztah @moxiegirl Thanks for your review, updated. |
Signed-off-by: Qiang Huang <[email protected]>
Signed-off-by: Qiang Huang <[email protected]>
916883a to
b6f1b4a
Compare
|
@thaJeztah Never mind, rebased, just wait for Jenkins :) |
|
Thanks @hqhq, LGTM! |
|
ping @moxiegirl hope this can be merged before I rebase the other one. |
|
@hqhq I see material that needs changing --- our documentation should not use the royal "We" but actually since this is in general approval and you have a dependency. Let's do this...merge it and I'll carry the change to the royal we. @thaJeztah for the merge. |
|
Thanks @moxiegirl , ping @thaJeztah |
Add support for kernel memory limit
|
It's merged! Thanks @hqhq !! |
|
Thank you @hqhq! |
@hqhq could you point to the commit sha in kernel upstream that fixes the issue you mention? |
Addresses: #6479
We have a requirement only kernel newer than 4.0 can use this feature, because
only kernel newer than 4.0 fixed reclaim problem for kmem, which makes kmem
limit real usable.
Signed-off-by: Qiang Huang [email protected]