Care and Feeding of Linux on MIPS processors
As developers determine which OS they will choose, it's important in reducing overall costs and time-to-market that they choose one that is fully supported for their specific processor.
This means that much of the kernel maintenance is already being handled, so if they have issues or challenges, the processor vendor and its ecosystem can help solve them. Plus, by using a kernel release that has been officially tested by the vendor, a customer is reducing—if not eliminating—the risk of problems as the design continues.
The processor-specific Linux ecosystem can enable quick and accurate isolation of differences in customer applications against a set of standard configurations and testbenches.
From the processor vendor's point of view, it's critically important to be actively involved in the maintenance of the Linux kernel that is relevant to its cores.
These vendors are in the best position to implement additional new features, and also to increase the stability of legacy core features, since they know all the intimate implementation details of the core design.
As a processor IP company, MIPS Technologies must ensure that its new processor cores are properly integrated into the Linux source code tree, and that these changes are properly validated through regression testing on legacy cores and platforms.
MIPS has its own key kernel maintainer that must 'sign off' (approve) every suggested 'patch'. These patches are submitted by MIPS and our customers, and they address not only new core features and enhancements, but also improvements to existing core support and the occasional bug fix.
While MIPS IP cores are proprietary, it is in the best interest for both MIPS and the Linux community to ensure that all performance and power management features available in MIPS cores are fully implemented in the Linux kernel.
This provides the best user experience for customers using Linux as the core OS of the design, and also allows for peer review of the kernel enhancements by hundreds of Linux kernel programmers. This will only add to the stability and robustness of core or architecture-specific patches.
Support for new core designs must not break or degrade the existing core support structure, and must also allow existing customers to quickly migrate to a new core technology with minimal internal effort.
The configurable nature of MIPS cores makes the maintenance of the Linux kernel code base even more challenging, since many combinations of core configurations must be tested to ensure the newly added features are functional across all combinations.
Kernel Optimization " Multi-core Support
One area where we spend a lot of effort on Linux kernel optimizations is for multi-core support. Today, with the aim of achieving the best computing power per area (MIPS/square millimeter) and computing power per unit power (MIPS/mW), many processors leverage multi-core technology to distribute the processing load across many cores running at a lower clock frequency.
The applications can be distributed in a symmetric fashion known as Symmetrical Multiprocessing (SMP), in which a task is more or less equally shared among the cores; or Asymmetrical Multiprocessing (AMP), in which specific tasks are assigned to a specific core. In either case, proper support must be available in the Linux kernel to allow these types of programming models to be implemented, while being as transparent to the application developer as possible.
MIPS Technologies' multi-threaded 34K core and multi-threaded/multiprocessing 1004K core require slightly different approaches to multi-core management within the kernel, since the 34K core provides the facility of multiple virtual cores or VPEs (Virtual Processing Elements) on one physical instance of a single core, and the 1004K core provides a coherent implementation of a multi-core device.
For each of these cores, the Linux kernel multi-core support and optimizations we implement must be able to correctly identify the core in use, and properly initialize and implement the specific multi-core features seamlessly.
The implementation model of task sharing in a 34K-based device must understand that one physical core is actually appearing as more than one virtual core, and these cores are not automatically coherently managed.
This type of multi-core environment in some cases lends itself better to an AMP environment with a separate operating system running on each VPE. The true coherent multi-core design of the 1004K core makes traditional SMP models more attractive where a single operating system has full control of both cores.