Intel Open-Sources "Knights Corner" Linux Code

Written by Michael Larabel in Intel on 13 June 2012 at 01:08 PM EDT. 5 Comments
Intel has published open-source code for supporting the Knights Corner micro-architecture on Linux.

Last week Intel pushed out code for Knights Corner, but up to now it seems the Linux support has been largely unnoticed. Knights Corner is the 22nm successor to Knights Ferry and part of Intel's Many Integrated Core (MIC) Architecture that is derived from their Larrabee project back in the day. Intel Knights Corner hardware should begin surfacing in the coming months in limited quantities and will feature 50+ cores per chip. Early hardware of Knights Corner has been shown going back to last November.

On the 5th of June, the first open-source Linux code for Knights Corner was published. The software stack consists of embedded Linux, a modified GCC compiler, and a software driver. Intel's also modified GDB for Knights Corner debugging support. Intel calls this Knights Corner stack the MPSS, short for the "Intel Many Integrated Core (MIC) Platform Software Stack." This stack uses the Linux 2.6.34 kernel and is tested against Red Hat Enterprise Linux 6 and SuSE Linux Enterprise Server 11.

As far as what the code does, "The open source updates we have made are in support of the instruction set, the ABI, initializing and controlling an SMP on-a-chip, and the glue software to support the coprocessor communication with the host system. The Symmetric Communications Interface (SCIF) is included in the RPM bundle. SCIF provides a mechanism for inter-node communications within a single platform. A node, for SCIF purposes, is defined as either a Knights Corner device or the Intel Xeon processor. In particular, SCIF abstracts the details of communicating over the PCI Express bus. The SCIF APIs are callable from both user space (uSCIF) and kernel-space (kSCIF)."

The GCC changes work for the Knights Ferry prototype board or the Knights Corner co-processor. However, not supported right now is the Knights Corner vector instructions and optimization improvements. "GCC for Knights Corner is really only for building the kernel and related tools; it is not for building applications. Using GCC to build an application for Knights Corner will most often result in low performance code due its current inability to vectorize for the new Knights Corner vector instructions. Future changes to give full usage of Knights Corner vector instructions would require work on the GCC vectorizer to utilize those instructions’ masking capabilities. This is something that requires a broader discussion in the GCC community than simply changing the code generator."

Linux kernel changes to enable Knights Corner include "little changes" for supporting the Intel Pentium processor core with 64-bit and special vector instructions, power management support, and introducing the Knights Corner machine check architecture. Much of the other Knights Corner Linux kernel code reuses the Intel Pentium processor support code.

Additional information on the Knights Corner open-source code drop is available from this blog post.

There's also a separate blog post on the Knights Corner micro-architecture support. Below are some quotes from that posting.

- "The software stack download includes source for an embedded Linux environment which runs on Knights Corner coprocessors along with the driver code that connects Knights Corner coprocessors to a host processor. To build this code stack, we have included a minimally modified GCC compiler. To support application development, we have enabled GDB. This is just the beginning! The Intel Parallel Studio XE and Intel Cluster Studio XE products for Linux are also entering public field-testing, including support for Knights Corner coprocessors. These high-performance, familiar and popular tools simply support Knights Corner as another target without requiring new tools or separate product purchases. A number of other vendors are working on their support for Knights Corner as well in their familiar and popular products."

- "The MIC architecture is specifically designed to provide the programmability of an SMP system while optimizing for power efficiency and highly parallel workloads. Knights Corner is the first product to use this architecture and deliver on this exciting vision. It’s an SMP on-a-chip."

- "This combination of Linux, 64-bits, and new vector capabilities with an Intel® Pentium® processor-derived core, means that Knights Corner is not completely binary compatible with any previous Intel processor."

- "Knights Corner is a coprocessor so it lives in a system with a regular “host” processor that boots up the overall system and orders the coprocessor around. This is a product design, not an architectural feature. While it is an SMP-on-a-chip, we can think of Knights Corner as an embedded system from the standpoint of the operating system. Therefore, Knights Corner boots and runs an embedded Linux kernel and is connected to the main system through enabling software which lives in drivers on both the host system and the embedded system. The changes to open source components are in support of the instruction set choices, the ABI, initializing and controlling an SMP on-a-chip, and the enabling software to support the coprocessor communication with the host system."

Fun Fact: One of the original developers on the Larrabee project who was working on the software stack was Mike Sartain via RAD Game Tools, who is now at Valve and one of the developers heavily involved with the Steam / Source Engine Linux client efforts. Michael Abrash was also involved with Larrabee and is also at Valve, but working on other projects.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week