-
Notifications
You must be signed in to change notification settings - Fork 652
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
improve definition of platform.features
#622
Comments
Proposed wording SGTM |
On Tue, Mar 21, 2017 at 04:05:09AM -0700, Jonathan Boulle wrote:
Proposed wording SGTM
And to me, although I think we want:
If a feature is not supported by Linux…
instead of:
If an architecture is not supported by Linux…
if the idea is to have folks registering things like ‘sse4_2’.
And I'd be happier if cpuinfo's flags values were documented
somewhere, but I haven't been able to turn up docs yet.
|
Unfortunately, So I'm not sure what to do. Using |
@AkihiroSuda I think you are getting hung up on the examples. If the examples are wrong fix them. There is no "docker compatible" value -- they aren't really in use. For the most part, these feature flags are platform dependent. |
Thank you all for the feedback. What should we do toward v1.0? Plan 1. Mark the Plan 2. Just remove it. We can revive it in future releases if needed. Plan 3. Standardize it for Linux on well-known platforms My suggestion is 1 (or 2). Also, the same discussion could be applied to
|
Can we set milestone of this to 1.0.0-rc6? |
If someone wants to step up and do the work here, that would be great. |
Based on Akihiro Suda's proposal [1] and the subsequent discussion. Using the Linux kernel to define the values is very convenient on Linux, but will likely be a pain for folks on other OSes. If a comprehensive, OS-agnostic list is found, we could use that instead, but would want to provide a mapping from that list of values to the Linux cpuinfo slugs for convenience. Providing a mapping from the OS-agnostic list to the cpuinfo analog on non-Linux OSes would also be convenient. Until then, folks wondering what a given feature slug means but unwilling to dig through the Linux source may find the Stack Overflow post at [2] useful. This definition is not only Linux-centric, it is x86-centric. The x86 Linux implementation writes 'flags' out here [3], but arm uses 'Features' [4]. While we could suggest values for other architectures, this commit restricts itself to the x86 family (using their GOARCH names [5], as the runtime spec recommends [6]), because that's the scope Stephen is currently claiming [7]. Extending the field to other architectures can happen in follow-up work. [1]: opencontainers#622 (comment) [2]: http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean [3]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/kernel/cpu/proc.c?id=refs/tags/v4.10.4#n96 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm/kernel/setup.c?id=refs/tags/v4.10.4#n1234 [5]: https://golang.org/doc/install/source#environment [6]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc5/config.md#platform [7]: opencontainers#622 (comment) Signed-off-by: W. Trevor King <[email protected]>
There's not much work to do if we agree that scoping the definition to Linux/(386|amd64) is acceptable for now. In #631, I've taken a stab based on @AkihiroSuda's initial proposal with the following changes:
I'm also comfortable with @AkihiroSuda's plans 1 or 2, but your response suggests you prefer his plan 3, which is where I've tried to go with #631. |
Based on Akihiro Suda's proposal [1] and the subsequent discussion. Using the Linux kernel to define the values is very convenient on Linux, but will likely be a pain for folks on other OSes. If a comprehensive, OS-agnostic list is found, we could use that instead, but would want to provide a mapping from that list of values to the Linux cpuinfo slugs for convenience. Providing a mapping from the OS-agnostic list to the cpuinfo analog on non-Linux OSes would also be convenient. Until then, folks wondering what a given feature slug means but unwilling to dig through the Linux source may find the Stack Overflow post at [2] useful. This definition is not only Linux-centric, it is x86-centric. The x86 Linux implementation writes 'flags' out here [3], but arm uses 'Features' [4]. While we could suggest values for other architectures, this commit restricts itself to the x86 family (using their GOARCH names [5], as the runtime spec recommends [6]), because that's the scope Stephen is currently claiming [7]. Extending the field to other architectures can happen in follow-up work. [1]: opencontainers#622 (comment) [2]: http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean [3]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/kernel/cpu/proc.c?id=refs/tags/v4.10.4#n96 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm/kernel/setup.c?id=refs/tags/v4.10.4#n1234 [5]: https://golang.org/doc/install/source#environment [6]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc5/config.md#platform [7]: opencontainers#622 (comment) Signed-off-by: W. Trevor King <[email protected]>
Based on Akihiro Suda's proposal [1] and the subsequent discussion. Using the Linux kernel to define the values is very convenient on Linux, but will likely be a pain for folks on other OSes. If a comprehensive, OS-agnostic list is found, we could use that instead, but would want to provide a mapping from that list of values to the Linux cpuinfo slugs for convenience. Providing a mapping from the OS-agnostic list to the cpuinfo analog on non-Linux OSes would also be convenient. Until then, folks wondering what a given feature slug means but unwilling to dig through the Linux source may find the Stack Overflow post at [2] useful. This definition is not only Linux-centric, it is x86-centric. The x86 Linux implementation writes 'flags' out here [3], but arm uses 'Features' [4]. While we could suggest values for other architectures, this commit restricts itself to the x86 family (using their GOARCH names [5], as the runtime spec recommends [6]), because that's the scope Stephen is currently claiming [7]. Extending the field to other architectures can happen in follow-up work. [1]: opencontainers#622 (comment) [2]: http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean [3]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/kernel/cpu/proc.c?id=refs/tags/v4.10.4#n96 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm/kernel/setup.c?id=refs/tags/v4.10.4#n1234 [5]: https://golang.org/doc/install/source#environment [6]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc5/config.md#platform [7]: opencontainers#622 (comment) Signed-off-by: W. Trevor King <[email protected]>
@AkihiroSuda Would you want to convert this to a pull request? |
@stevvooe suggested earlier in the discussion that this could be milestone==v1.0.0-rc6. Would one of the @opencontainers/image-spec-maintainers want to set as such? |
@RobDolinMS done |
On Thu, Apr 13, 2017 at 01:56:14PM -0700, Rob Dolin (MSFT) wrote:
@AkihiroSuda Would you want to convert this to a pull request?
|
Based on Akihiro Suda's proposal [1] and the subsequent discussion. Using the Linux kernel to define the values is very convenient on Linux, but will likely be a pain for folks on other OSes. If a comprehensive, OS-agnostic list is found, we could use that instead, but would want to provide a mapping from that list of values to the Linux cpuinfo slugs for convenience. Providing a mapping from the OS-agnostic list to the cpuinfo analog on non-Linux OSes would also be convenient. Until then, folks wondering what a given feature slug means but unwilling to dig through the Linux source may find the Stack Overflow post at [2] useful. This definition is not only Linux-centric, it is x86-centric. The x86 Linux implementation writes 'flags' out here [3], but arm uses 'Features' [4]. While we could suggest values for other architectures, this commit restricts itself to the x86 family (using their GOARCH names [5], as the runtime spec recommends [6]), because that's the scope Stephen is currently claiming [7]. Extending the field to other architectures can happen in follow-up work. The vmx example is based on: On Mon, Apr 24, 2017 at 01:53:43AM -0700, Akihiro Suda wrote [8]: > I think we should not take too much effort for deciding example > values, but how about: > > "feature `vmx` marks support for instruction > `VMXON,VMXOFF,VMLAUNCH,VMRESUME,VMCALL,VMPTRLD,VMPTRST,VMCLEAR,VMREAD > and VMWRITE`, and this image contains an executable compiled to > use `VM... instructions` with no fallback”. > > I see some reasons to deploy such VMs as OCI images: > > - Android emulator (x86) > - Forked versions of KVM, that cannot be installed via apt-get > - `docker run`-nable Unikernel demo https://github.com/Unikernel-Systems/DockerConEU2015-demo > - ... > > For these use cases, checking whether `vmx` supported is useful, > because `vmx` is typically missing on EC2. [1]: opencontainers#622 (comment) [2]: http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean [3]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/kernel/cpu/proc.c?id=refs/tags/v4.10.4#n96 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm/kernel/setup.c?id=refs/tags/v4.10.4#n1234 [5]: https://golang.org/doc/install/source#environment [6]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc5/config.md#platform [7]: opencontainers#622 (comment) [8]: opencontainers#631 (comment) Signed-off-by: W. Trevor King <[email protected]>
Based on Akihiro Suda's proposal [1] and the subsequent discussion. Using the Linux kernel to define the values is very convenient on Linux, but will likely be a pain for folks on other OSes. If a comprehensive, OS-agnostic list is found, we could use that instead, but would want to provide a mapping from that list of values to the Linux cpuinfo slugs for convenience. Providing a mapping from the OS-agnostic list to the cpuinfo analog on non-Linux OSes would also be convenient. Until then, folks wondering what a given feature slug means but unwilling to dig through the Linux source may find the Stack Overflow post at [2] useful. This definition is not only Linux-centric, it is x86-centric. The x86 Linux implementation writes 'flags' out here [3], but arm uses 'Features' [4]. While we could suggest values for other architectures, this commit restricts itself to the x86 family (using their GOARCH names [5], as the runtime spec recommends [6]), because that's the scope Stephen is currently claiming [7]. Extending the field to other architectures can happen in follow-up work. The vmx example is based on: On Mon, Apr 24, 2017 at 01:53:43AM -0700, Akihiro Suda wrote [8]: > I think we should not take too much effort for deciding example > values, but how about: > > "feature `vmx` marks support for instruction > `VMXON,VMXOFF,VMLAUNCH,VMRESUME,VMCALL,VMPTRLD,VMPTRST,VMCLEAR,VMREAD > and VMWRITE`, and this image contains an executable compiled to > use `VM... instructions` with no fallback”. > > I see some reasons to deploy such VMs as OCI images: > > - Android emulator (x86) > - Forked versions of KVM, that cannot be installed via apt-get > - `docker run`-nable Unikernel demo https://github.com/Unikernel-Systems/DockerConEU2015-demo > - ... > > For these use cases, checking whether `vmx` supported is useful, > because `vmx` is typically missing on EC2. [1]: opencontainers#622 (comment) [2]: http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean [3]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/kernel/cpu/proc.c?id=refs/tags/v4.10.4#n96 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm/kernel/setup.c?id=refs/tags/v4.10.4#n1234 [5]: https://golang.org/doc/install/source#environment [6]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc5/config.md#platform [7]: opencontainers#622 (comment) [8]: opencontainers#631 (comment) Signed-off-by: W. Trevor King <[email protected]>
can we close this then? :-) |
On Fri, May 12, 2017 at 11:36:33AM -0700, v1.0.0.batts wrote:
can we close this then? :-)
It should probably stay open until #672 lands.
|
https://github.com/opencontainers/image-spec/blob/ab461b048bd1c8b6077d8e96936f706a518233c2/image-index.md
The definition of
platform.features
seems vague.At first glance, I thought the values are adopted from Linux
/proc/cpuinfo
, but I learned that thecpuinfo
file never containssse4
.http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean
(Note: AMD's SSE-4A is completely unrelated to Intel's SSE4 http://www.cpu-world.com/Glossary/S/SSE4a.html)
How about improving the definition like this:
This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature.
Values for
features
SHOULD use, and implementations SHOULD understand,flags
entries listed in the Linux/proc/cpuinfo
file. If an architecture is not supported by Linux, it SHOULD be submitted to this specification for standardization.For example,
sse4_1
oraes
on theamd64
andi386
architecture.Also, for compatibility with Docker images, implementations SHOULD understand the following
features
values as well:amd64
,i386
sse4
sse4_1
The text was updated successfully, but these errors were encountered: