Skip to content

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

Merged
crosbymichael merged 1 commit intoopencontainers:masterfrom
hqhq:use_uint64_for_resources
Mar 20, 2017
Merged

Use uint64 for resources to keep consistency with runtime-spec#1375
crosbymichael merged 1 commit intoopencontainers:masterfrom
hqhq:use_uint64_for_resources

Conversation

@hqhq
Copy link
Copy Markdown
Contributor

@hqhq hqhq commented Mar 20, 2017

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

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@rh-atomic-bot
Copy link
Copy Markdown

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
Copy Markdown
Contributor

mrunalp commented Mar 20, 2017

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Copy Markdown
Member

crosbymichael commented Mar 20, 2017

LGTM

Approved with PullApprove

@justincormack
Copy link
Copy Markdown
Contributor

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

@crosbymichael
Copy link
Copy Markdown
Member

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

@hqhq
Copy link
Copy Markdown
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 <justin.cormack@docker.com>
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 <justin.cormack@docker.com>
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 <justin.cormack@docker.com>
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 <justin.cormack@docker.com>
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 <justin.cormack@docker.com>
(cherry picked from commit e73cd70)
Signed-off-by: Tibor Vass <tibor@docker.com>
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