Skip to content

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 [email protected]

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 <[email protected]>
@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