-
Notifications
You must be signed in to change notification settings - Fork 18.9k
add support for cpuset.mems #9536
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
|
Thanks, i'll update docker with the libcontainer change soon. |
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 cannot remove this as it will break existing people using this but we can add more values.
flCpusetCpus = cmd.String([]string{"#-cpuset", "-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
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.
You are right, I'll change it soon.
af842a5 to
eb752a8
Compare
|
@crosbymichael please review again, I also fixed the tarsum test problem caused by this commit. |
|
ping. |
|
Isn't this breaking change for API? |
|
@LK4D4 which API do you mean? |
|
@hqhq Docker http API, for which in docs you changed |
|
Yes, but that's internal date, right? the only point that will affect user is the |
|
The new flags need to be documented in the run and create sections of both |
eb752a8 to
9e27075
Compare
|
@SvenDowideit Thanks for your review, I did miss that, I have updated patches as you said, |
|
update: add a patch for test case. |
docs/man/docker-create.1.md
Outdated
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.
mmm, i think you will need to tell the reader what an MEMs is - CPU possibly not - @fredlf ?
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.
ok, I'll add that, thanks.
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.
Nah, I don't think we need to define CPU. But yes, we need to define MEMs.
|
@hqhq in run.md, we should also give the user an example, and explain what it does. |
|
@hqhq Docker API still used by users. |
|
@LK4D4 Hmmm.... what's your suggestion then? Should we keep using Cpuset |
|
@hqhq I don't know actually :) There is way to check API version, but I'm not sure how this can help. Only way I see - deprecation in docs :) Maybe @crosbymichael knows better way |
|
@crosbymichael @LK4D4 what do you think if we go this way:
|
|
@hqhq I am okay with this. But we're not very good with removing things :) Maybe in 2.0. |
|
Agree with @SvenDowideit that we need an example in run.md and should define MEMs. |
09efe67 to
368f585
Compare
|
@SvenDowideit @fredlf @LK4D4 @crosbymichael |
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.
Not sure that it is good idea to change docs for previous versions. ping @SvenDowideit
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.
You are right, I think we should not change docs for previous version.
For now, change v1.16 and v1.17 is good enought.
368f585 to
441e945
Compare
|
updated, remove the change of previous version of docs. |
|
@hqhq I'm not sure about 1.16 too, seems like this version was already released. |
|
No it won't break that, |
|
@hqhq sorry if I doesn't get, but here: |
|
Yes, it is not passed to One exception is that when users use |
|
@hqhq I'm talking about case when use use |
As we will add CpusetMems, CpusetCpus is definitely a better name, but some users are already using Cpuset in their http APIs, so we need time to change it, right now we just make it compatible. A significant change is that we add CpusetCpus in hostConfig, not Config, because it's host dependent. For compatibility, the main idea is keep using Cpuset in Config Struct, and make it has the same value as CpusetCpus, but not always, some scenarios: - Users use --cpuset in docker command, it can setup cpuset.cpus and can get Cpuset field from docker inspect or other http API which will get config info. - Users use --cpuset-cpus in docker command, ditto. - Users use Cpuset field in their http APIs, ditto. - Users use CpusetCpus field in their http APIs, they won't get Cpuset field in Config info, because by then, they should already know what happens to Cpuset. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
19049b3 to
0319b1a
Compare
|
@LK4D4 Yep, that's the point I've missed in this version, sorry about that, Update:
|
|
Now seems legit :) |
|
@LK4D4 @unclejack shouldn't we wait until we can move all the resource config options to the hostconfig instead of having 6 on Config and 2 on hostconfig? |
|
@crosbymichael Fair enough, I'll remove my approval. |
|
This is something that we will have to do(carry the pr) because @hqhq has already helped alot and has been awesome on expanding cgroup support for docker. @hqhq sorry for the confusion with this PR. Cgroup resource options have been on the Let us discuss a little more about a game plan for these resource settings and we can do the work if any more changes are required. Thanks again!! |
|
@crosbymichael agreed, we should stop all the confusion of cgroup resource options, but this might be done step by step, and I think this PR is a good place to start. What we need to do now is to confirm a proper way to do the compatibility work, don't have any regressions and make sure people can know how to use it the right way. So we can copy it to all other options. And I'd like to do this work :) What do you think? BTW, do you think the compatibility work in this PR is good enough for all other options? |
|
@hqhq that would be awesome if you are interested in doing this work. I think at the API request level we should do the copy from Then if you just move all the cgroup resource options to hostconfig and make sure it's copied at the API level it would be good to go. Thanks for your help on this! |
|
TBH, the text of the docs is now sufficiently detailed, that an example isn't going to be useful - great job! If we were to add an example, it would draw more attention to it from readers that do not have a NUMA system, and we should not make them (aka the majority) jealous :) |
|
Should there be something in the run.md docs? Otherwise LGTM. |
|
Thanks for all your reviews, let's wait for PR #10298 right now. |
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.
four, processes, Docker
|
Copy edits, otherwise LGTM. Agree with Sven, example no longer really needed. |
|
We will close this one for now in favor of the work being done in #10298 to allow this change to be merged. |
|
@crosbymichael Can we reopen this PR now? #10298 has been merged. |
|
@unclejack codes are quite different, I just send a new PR to support cpuset.mems, #12139, please take a look. |
No description provided.