Skip to content
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

Set specs value the same as kernel API input #704

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

hqhq
Copy link
Contributor

@hqhq hqhq commented Mar 1, 2017

This partially revert #648 , after a second thought, I think we
should use specs value the same as kernel API input, see:
#692 (comment)

For memory and hugetlb limits *.limit_in_bytes, cgroup APIs take the values
as string, but the parsed values are unsigned long, see:
https://github.com/torvalds/linux/blob/v4.10/mm/page_counter.c#L175-L193

For cpu.cfs_quota_us and cpu.rt_runtime_us, cgroup APIs take the input
value as signed long long, while cpu.cfs_period_us and cpu.rt_periof_us
take the input value as unsigned long long.

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

This partially revert opencontainers#648 , after a second thought, I think we
should use specs value the same as kernel API input, see:
opencontainers#692 (comment)

For memory and hugetlb limits *.limit_in_bytes, cgroup APIs take the values
as string, but the parsed values are unsigned long, see:
https://github.com/torvalds/linux/blob/v4.10/mm/page_counter.c#L175-L193

For `cpu.cfs_quota_us` and `cpu.rt_runtime_us`, cgroup APIs take the input
value as signed long long, while `cpu.cfs_period_us` and `cpu.rt_periof_us`
take the input value as unsigned long long.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@crosbymichael
Copy link
Member

crosbymichael commented Mar 1, 2017

LGTM

Approved with PullApprove

@crosbymichael crosbymichael added this to the 1.0.0 milestone Mar 1, 2017
@mrunalp
Copy link
Contributor

mrunalp commented Mar 1, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 40474dd into opencontainers:master Mar 1, 2017
@hqhq hqhq deleted the use_uint64_for_memory branch March 2, 2017 01:35
@vbatts vbatts mentioned this pull request Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants