1. Technical Field
The present application relates generally to an improved data processing system and method. More specifically, the present application is directed to mechanisms for optimization of thread wake up for shared processor partitions.
2. Description of Related Art
Logical partitioning (LPAR) is the ability to make a server run as if it were two or more independent servers. When one logically partitions a server, one divides the resources on the server into subsets called logical partitions. Processors, memory, and input/output devices are examples of resources that can be assigned to logical partitions. A logical partition runs as an independent logical server with the processor, memory, and I/O resources allocated to it. Examples of the kinds of software that can be installed and run on logical partitions include the AIX®, i5/OS™, and Linux® operating systems and Virtual I/O Server software. “AIX” and “i5/OS” are trademarks of International Business Machines Corporation in the United States, other countries, or both. “LINUX” is a trademark of Linus Torvalds in the United States, other countries, or both.
The Hardware Management Console (HMC) is an example of a hardware appliance that connects to the server firmware. The HMC may be used to specify to the server firmware how to allocate resources among the logical partitions on the managed system. The HMC may also be used to start and stop the logical partitions, update server firmware code, manage Capacity on Demand, and transmit service information to service and support if there are any hardware problems with the managed system. The server firmware is code that is stored in system flash memory on the server. The server firmware directly controls resource allocations on the server and communications between logical partitions on the server.
Although each logical partition acts as an independent server, the logical partitions on a physical server can share some kinds of resources with each other. The ability to share resources among many logical partitions allows increased resource utilization on the server by shifting the server resources to where they are needed.
A processor is a device that processes programmed instructions. The more processors assigned to a logical partition, the greater the number of concurrent operations the logical partition can run at any given time. Dedicated processors are whole processors that are assigned to a single partition. Shared processors are physical processors whose processing capacity is shared among multiple logical partitions.
The ability to divide physical processors and share them among multiple logical partitions is known as Micro-Partitioning™ or shared processor logical partitioning (SPLPAR). Micro-Partitioning™ (or shared processing) allows logical partitions to share one or more processors on the server. These are referred to as the shared processor pool. “MICRO-PARTITIONING” is a trademark of International Business Machines Corporation in the United States, other countries, or both. The shared processor pool includes all processors on the server that are not dedicated to specific logical partitions or reserved for capacity on-demand. Each logical partition that uses the shared processor pool is assigned a specific amount of processor power from the shared processor pool that it may use. If the logical partition needs more processor power than its assigned amount, the logical partition may (capped/uncapped defines this) use the unused processor capacity in the shared processor pool. The amount of processor capacity that an uncapped logical partition can use is limited only by the number of virtual processors assigned to the logical partition and the amount of unused processor power available in the shared processor pool.
Virtualization is the pooling of data processing resources in a way that shields the physical nature and boundaries of those resources from the partition's operating systems and users. Virtualization of processors through shared processor partitioning involves an additional layer of software, or firmware, between the operating system(s) and the hardware. Additionally, optimizations to the operating system(s) are usually required for best performance and responsiveness.
In the operating system, when a software thread is waiting on some event (e.g., a lock wait or waiting on data to reach a socket) and the event occurs, the operating system makes the software thread runnable and determines on which logical processor to run the thread. Work to be done within an operating system is broken into processes and further into threads. Generally speaking, a process is usually, but not always, analogous to an application program. The threads of a process share the same virtual address space, but run semi-independently. Thus, while one thread is waiting for a file to be read in from disk, another thread can be performing calculations, for example. Typically, the operating system attempts to run the thread on the same logical processor to maintain cache affinity.
One very key factor in the overhead introduced with shared processor partitioning is cache thrashing. Effectively, each operating system has a set of unique storage that it typically touches when running work. In a system without shared processor logical partitioning, the hardware caches of the system tend to do a good job of containing a set of unique storage, or footprint. However, with shared processor logical partitioning, the firmware dispatches and undispatches physical processors to different operating systems over time, which tends to reduce the effectiveness of the hardware caches.