1. Technical Field
The present invention is directed to an apparatus, method, and computer program product for privatizing operating system data.
2. Description of Related Art
Data privatization is a known software technique used in shared-memory multiprocessor (SMMP) hardware systems. Data privatization involves storing data that is only needed by a particular processor in a specific cache line for that processor in the shared cache memory. A cache line is a portion of the processor""s cache that represents a section of physical memory of the same size. In order for other processors to access the privatized data in the shared cache memory, the other processors must explicitly reference the memory where the privatized data is stored.
Data privatization allows SMMP hardware systems to avoid coherency misses in hardware caches. When a cache line is written to, it becomes the only valid copy of that memory. As a result, all other copies of that cache line must be invalidated. A cache miss is when memory must be read from slower system memory (RAM) into the faster access cache, due to the cache line containing other data. These cache misses are caused by read/write sharing of data among processors where one processor is writing to a cache address location while another processor is reading from the same cache address location. Such cache misses negativley impact the performance of the operating system software.
Data privatization has two main types of uses. First, data privatization is used with frequently modified operating system data that represents the states of each processor. This data is infrequently accessed by other processors and hence, is a good candidate for privatization. An example of this first use is data privatization being used with per-processor run queue data.
The second use of data privatization is with global state data that can be maintained on a per-processor basis. This data is infrequently needed on a system-wide basis and, because it is maintained on a per-processor basis, no processor""s data will ever be written to by another processor. An example of such global state data is global statistics.
Under known data privatization techniques, a private copy of read/write data is maintained in separate cache lines for each processor. Each processor only modifies its own copy of the data, thus avoiding modifications to shared cache lines and cache coherency overhead.
On SMMP hardware systems with non-uniform memory access (NUMA), data privatization must also consider the distribution of physical memory pages. The locality of the physical memory will affect the performance cost of cache misses in cases where the data must be fetched into the hardware cache from physical memory. The performance cost of these cache misses is lowest when the private data is placed in physical memory pages that are local to the processor.
Data privatization must also consider the dynamic nature of the physical configurations of SMMP hardware systems. This must be considered because data is to be maintained on a per-processor basis in local memory for the processors of the hardware system and the physical configuration of the system may change dynamically as processors and/or memory are added to and removed from the hardware system as part of a physical reconfiguration operation.
Data privatization is widely applicable to many subsystems of operating system software, e.g., virtual memory manager, filesystems, security, etc. However, data privatization requires each area to have an understanding of the complexities of the physical characteristics, e.g., cache and page size, number of processors present, etc., physical topology, e.g., the physical distribution of memory, and dynamic nature of the hardware system on which it is utilized. In addition, each area must define its own methods of privatizing its data as no systematic facilities exist. Thus, it would be beneficial to have an apparatus, method and computer program product for providing a uniform privatization scheme to eliminate the need for multiple privatization schemes. Moreover, it would be beneficial to have a uniform privatization scheme in which the physical characteristics, physical topology and dynamic nature of hardware systems are taken into consideration.
The present invention provides an apparatus, method and computer program product for privatizing operating system data. With the apparatus, method and computer program product of the present invention, a block of memory is allocated and divided into identical, smaller, properly aligned storage areas, each dedicated to a single processor in a multiprocessor system. The storage areas are allocated either initially when the system is initialized or on an as needed basis.
Each sub-allocation request is made to use storage at the same location relative to the start of that processor""s storage space. This allows for fast lookup. By having each sub-allocation at offset n and maintaining the address of the start of each processor""s storage area, the address of a given processor""s private data is merely  less than local address start greater than +n. Because each processor""s storage is isomorphic to all other processors, only one allocation record for all processors is needed, thereby reducing the overhead of the data privatization scheme. By allocating memory in this manner, cache line contention is minimized.
USPTO Backgrounds
USPTO Backgrounds