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

Use uint64 for resources to keep consistency with runtime-spec #1375

Merged
merged 1 commit into from
Mar 20, 2017

Conversation

hqhq
Copy link
Contributor

@hqhq hqhq commented Mar 20, 2017

Signed-off-by: Qiang Huang [email protected]

@rh-atomic-bot
Copy link

256/264 passed on RHEL - Failed.
248/262 passed on CentOS - Failed.
262/263 passed on Fedora - Failed.
Log - https://aos-ci.s3.amazonaws.com/opencontainers/runc/runc-integration-tests-prs/296/fullresults.xml

@mrunalp
Copy link
Contributor

mrunalp commented Mar 20, 2017

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Member

crosbymichael commented Mar 20, 2017

LGTM

Approved with PullApprove

@justincormack
Copy link
Contributor

This breaks use of the value -1 which is valid.

@crosbymichael
Copy link
Member

@justincormack do you want to submit a PR to revert this?

@hqhq
Copy link
Contributor Author

hqhq commented Jun 23, 2017

@justincormack -1 should be usable, can you elaborate what use of value -1 is broken?

justincormack added a commit to justincormack/runtime-spec that referenced this pull request Jun 23, 2017
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- opencontainers/runc#1494
- opencontainers/runc#1492
- opencontainers/runc#1375
- opencontainers/runc#1421

Signed-off-by: Justin Cormack <[email protected]>
justincormack added a commit to justincormack/runtime-spec that referenced this pull request Jun 23, 2017
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- opencontainers/runc#1494
- opencontainers/runc#1492
- opencontainers/runc#1375
- opencontainers/runc#1421

Signed-off-by: Justin Cormack <[email protected]>
justincormack added a commit to justincormack/runtime-spec that referenced this pull request Jun 23, 2017
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- opencontainers/runc#1494
- opencontainers/runc#1492
- opencontainers/runc#1375
- opencontainers/runc#1421

Signed-off-by: Justin Cormack <[email protected]>
justincormack added a commit to justincormack/runtime-spec that referenced this pull request Jun 23, 2017
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- opencontainers/runc#1494
- opencontainers/runc#1492
- opencontainers/runc#1375
- opencontainers/runc#1421

Signed-off-by: Justin Cormack <[email protected]>
tiborvass pushed a commit to tiborvass/runtime-spec that referenced this pull request Jul 6, 2017
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- opencontainers/runc#1494
- opencontainers/runc#1492
- opencontainers/runc#1375
- opencontainers/runc#1421

Signed-off-by: Justin Cormack <[email protected]>
(cherry picked from commit e73cd70)
Signed-off-by: Tibor Vass <[email protected]>
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.

5 participants