This repository was archived by the owner on Mar 11, 2020. It is now read-only.
[17.06.1] Make Linux memory allocations int64 not uint64#1
Merged
tiborvass merged 1 commit intodocker-archive:docker-17.06.xfrom Jul 6, 2017
Merged
[17.06.1] Make Linux memory allocations int64 not uint64#1tiborvass merged 1 commit intodocker-archive:docker-17.06.xfrom
tiborvass merged 1 commit intodocker-archive:docker-17.06.xfrom
Conversation
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>
|
LGTM
…On 6 Jul 2017 6:16 pm, "Tibor Vass" ***@***.***> wrote:
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#1494>
- opencontainers/runc#1492
<opencontainers/runc#1492>
- opencontainers/runc#1375
<opencontainers/runc#1375>
- opencontainers/runc#1421
<opencontainers/runc#1421>
Signed-off-by: Justin Cormack ***@***.***
(cherry picked from commit e73cd70
<e73cd70>
)
Signed-off-by: Tibor Vass ***@***.***
From opencontainers/runtime-spec#876
<opencontainers#876>
cc @justincormack <https://github.com/justincormack> @crosbymichael
<https://github.com/crosbymichael>
------------------------------
You can view, comment on, or merge this pull request online at:
#1
Commit Summary
- Make Linux memory allocations int64 not uint64
File Changes
- *M* config-linux.md
<https://github.com/docker/runtime-spec/pull/1/files#diff-0> (20)
- *M* config.md
<https://github.com/docker/runtime-spec/pull/1/files#diff-1> (4)
- *M* schema/config-linux.json
<https://github.com/docker/runtime-spec/pull/1/files#diff-2> (10)
- *M* specs-go/config.go
<https://github.com/docker/runtime-spec/pull/1/files#diff-3> (12)
Patch Links:
- https://github.com/docker/runtime-spec/pull/1.patch
- https://github.com/docker/runtime-spec/pull/1.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAdcPC5thVyi2aWfDs1MQe1q0yg13FHBks5sLRYegaJpZM4OP7su>
.
|
|
LFTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(cherry picked from commit e73cd70)
Signed-off-by: Tibor Vass tibor@docker.com
From opencontainers#876
cc @justincormack @crosbymichael