Concurrent Real-Time Extensions Technical White Paper
Total Page:16
File Type:pdf, Size:1020Kb
Technical White Paper DATA CENTER www.novell.com Concurrent Real-Time Extensions Powered by SUSE® Linux Concurrent Real-Time Extensions Powered by SUSE Linux Table of Contents: 2 . Rely on Real-time Capabilities for Linux 2 . Explore New Real-time Services 2 . Concurrent Real-Time Extensions Features 5 . Programmatic Features 6 . System Deployment and Management 7 . Building Your Service-oriented Infrastructure (SOI) 9 . Virtual Computing Platform 9 . Integrated Services 9 . Summary p. 1 Rely on Real-time Capabilities for Linux* By choosing Linux and Many of today’s businesses—including your real-time data center, you can configure Concurrent RTE for your financial institutions, manufacturers, govern- a modular, rich system that helps you consoli- real-time data center, ment agencies, telecommunications carriers date servers, reduce costs and consistently you can configure a and medical providers—require deterministic, achieve high quality of service. modular, rich system that real-time computing. In other words, their high- helps you consolidate priority transactions, line processes, test data Explore New Real-time Services servers, reduce costs acquisitions and product simulations must With recent real-time enhancements to and consistently achieve execute accurately and predictably every the SUSE Linux kernel, Concurrent RTE high quality of service. time—at sub-second speeds. Because of showcases a highly flexible foundation. This these exacting requirements and the need for foundation is essential for applications that tight security and interoperability, a growing require deterministic behavior. For example, number of businesses are turning to Linux*. financial-trading applications must respond to real-time events, such as new pricing, You’ve witnessed firsthand the remarkable without any delays or interruptions. Likewise, expansion and adoption of the Linux operat- in telecommunications applications, external ing system. It’s gained a significant footprint signals must be processed instantly and in the enterprise data center and currently without dropping a bit. It’s also extremely supports thousands of applications. Now, important for government mission-critical Novell®, Inc. and Concurrent Computer environments such as missile defense, air Corporation have enhanced Linux to deliver traffic control, and emergency response the real-time capabilities you need. Concurrent systems to process their respective trans- Real-Time Extensions Powered by SUSE® actions without delay. Linux (hereafter called Concurrent RTE) is an industry-standard, real-time version of Linux Now you can take a closer look at our for Intel- and AMD-based multiprocessors. real-time offerings for Linux. We outline the This platform, an enriched distribution of the specific technical capabilities of Concurrent SUSE Linux kernel from Novell, provides RTE, including enterprise services offerings. you with guaranteed performance in time- You will also see how Concurrent RTE delivers critical environments. a solid foundation for your Service-oriented Infrastructure (SOI). You can use it to build the Key features—including CPU shielding, next generation of data-center computing, kernel preemption, low latency and priority creating an on-demand infrastructure that inheritance—help you achieve sustainable is modular, highly responsive and easy to real-time performance on Linux. You can deploy and control. also rely on other important capabilities that improve quality of service and provide Concurrent Real-Time a solid foundation for a Service-oriented Extensions Features Infrastructure. These features include distrib- uted shared memory, Xen virtualization and Built on the powerful SUSE Linux kernel, real-time cluster file systems, all of which are Concurrent RTE delivers real-time perform- enhanced significantly by the low latency and ance and capabilities. These enhancements, deterministic processing in Concurrent RTE. while easy to deploy, should be configured By choosing Linux and Concurrent RTE for by a professional who fully understands the p. 2 Concurrent Real-Time Extensions Powered by SUSE Linux www.novell.com application requirements and can tune Built on the powerful SUSE Linux kernel, your system for optimal performance. Concurrent RTE features centralized man- Concurrent RTE delivers real-time agement and the NightStar™ application performance and capabilities. development tools. The five NightStar tools in Concurrent RTE help you non-intrusively debug, monitor, analyze, tune and schedule A shielded CPU provides a deterministic You can use Concurrent time-critical applications. environment, one with predictable guaranteed RTE to build the next responses to interrupts, timers, messages generation of data-center Although extremely valuable for time- and network packets. Shielded CPUs are computing, creating an critical environments, Concurrent RTE is not valuable because they simultaneously provide on-demand infrastructure appropriate for all application deployments. a standard Linux execution environment and that is modular, highly Real-time systems deliver extraordinarily superior quality of service. responsive and easy to predictable application response at the deploy and control. potential cost of overall system throughput. When you run an application on a shielded For example, in order to guarantee predictable CPU, you can be assured that regular system response time for high-priority applications, processing (such as clock/device interrupts normal system processing (e.g., daemons, or system daemons) will not negatively affect interrupts and so forth) is occasionally delayed or interrupt application execution. so the system can first complete these high- priority processes. Kernel Preemption You can configure Concurrent RTE so that The following sub-sections outline specific a high-priority process preempts a lower modifications to Linux that allow highly priority process already executing inside predictable operating system behavior: the kernel. Although standard Linux offers a configuration parameter for this behavior, CPU Shielding most Linux distributions do not ship with the Using Concurrent RTE, you can shield parameter enabled. With kernel preemption selected CPUs from unpredictable processing disabled, a lower-priority process executing elements—such as interrupts and system inside the kernel would continue running daemons—that sometimes delay the execution until it exited the kernel. At that time, the of high-priority applications. For example, high-priority process would begin running. suppose a financial trading application was By enabling kernel preemption, you’ll see context-switched during a critical transaction. substantially faster response times for high- Without CPU shielding, this type of switch priority processes. When you have a real- would delay transaction completion until the time process ready for execution (perhaps in system could finish running the application. response to an asynchronous system event) the system will immediately interrupt or con- By marking a CPU as shielded, you modify text-switch any lower-priority processes and the affinity masks of all processes and inter- start running the higher-priority real-time event. rupts in the system. In fact, the shielded CPU is removed from the affinity masks for most Low-latency Enhancements processes and interrupts. Only processes To protect the shared data structures it and interrupts that have explicitly set their uses, the Linux kernel relies on spin locks CPU masks to run on the shielded CPU will and semaphores to secure the code paths be able to do so. leading to those structures. To use spin locks, p. 3 Concurrent RTE provides kernel tunables To correct this problem, priority inheritance is implemented within the Linux semaphore that allow a system administrator to set the semantics. Priority inheritance involves tem- priority of the kernel daemons that handle porarily raising the priority of a low-priority process that is holding a semaphore when deferred interrupt processing. a higher priority process attempts to gain access to that semaphore. This ensures that the processes executing in a critical section The five NightStar tools the kernel must disable preemption—and have sufficient priority to continue execution in Concurrent RTE help sometimes interrupts—to prevent the dead- until they leave the critical section. you non-intrusively locks that would occur when an interrupt to debug, monitor, analyze, the current code path also attempts to lock SoftIRQ Enhancements tune and schedule time- the spin lock. Disabling preemption nega- critical applications. tively affects latency for high-priority threads Linux supports several mechanisms that of execution. are used by interrupt routines in order to defer processing that would otherwise have Concurrent has developed a standard been done at interrupt level. The processing methodology to identify the worst-case required to handle a device interrupt is split “preemption disabled” times. The low-latency into two parts. The first part executes at inter- enhancements applied to Concurrent RTE rupt level and handles only the most critical modify the algorithms in the identified worst- aspects of interrupt-completion processing. case preemption-disabled scenarios to provide better response times. The second part is deferred to run at program level. Interrupt-level processing is This capability directly impacts process- always performed at a priority greater than dispatch latency times for real-time applica- any