Affinity aware parallel zeroing of memory in non-uniform memory access (NUMA) servers
AssigneeInternational Business Machines Corporation
InventorsNikhil Hegde, Bruce Mealey, Mark D. Rogers
Life of this patent
Estimating the term…
Abstract
A method for zeroing memory in computing systems where access to memory is non-uniform includes receiving, via a system call, a request for a pool of memory, determining a size of the requested pool of memory, and creating a dummy memory segment. The size of the dummy memory segment is larger than the size of the requested pool of memory. The dummy memory segment is filled with one or more pages, based on the determined size of the requested pool of memory, and the dummy memory segment is deleted.
Claims15
A system, comprising:
- a processor;
- and
- a memory containing a program which, when executed on the processor, performs an operation, the operation comprising:
- receiving, via a system call, a request for a pool of memory;
- determining a size of the requested pool of memory;
- creating a dummy memory segment, wherein a size of the dummy memory segment is larger than the size of the requested pool of memory;
- filling the dummy memory segment with one or more pages, based on the determined size of the requested pool of memory;
- and
- deleting the dummy memory segment, wherein deleting the dummy memory segment comprises:
- sorting the one or more pages of the dummy memory segment according to each associated affinity domain of each page, wherein each affinity domain comprises a cluster of processors and memory local to the cluster of processors;
- sending requests to zero the sorted one or more pages to one or more software threads that are attached to the respective affinity domain;
- and
- waiting for a message, from the software threads in each affinity domain, indicating that all requests to zero have been processed before returning to a system caller of the system call.
A system, comprising:
- a processor;
- and
- a memory containing a program which, when executed on the processor, performs an operation, the operation comprising:
- receiving, via a system call, a request for a pool of memory;
- determining a size of the requested pool of memory;
- creating a dummy memory segment, wherein a size of the dummy memory segment is larger than the size of the requested pool of memory;
- filling the dummy memory segment with one or more pages, based on the determined size of the requested pool of memory;
- and
- deleting the dummy memory segment, wherein deleting the dummy memory segment comprises:
- transmitting a request to zero the one or more pages in the dummy memory segment to an intermediate software thread;
- using the intermediate software thread to perform the request as a background process, comprising:
- sorting the one or more pages of the dummy memory segment according to each associated affinity domain of each page, each affinity domain comprising a cluster of processors and memory local to the cluster of processors;
- sending requests to zero the sorted one or more pages to one or more additional software threads that are attached to the respective affinity domain;
- and
- receiving, from each of the one or more additional software threads, notifications that the requests to zero the sorted one or more pages have been processed;
- and
- upon receiving a message from the intermediate software thread, returning to a system caller, while performing the request, via the intermediate software thread, continues in the background.
A non-transitory computer-readable storage medium storing instructions, which, when executed on a processor, perform an operation, the operation comprising:
- receiving, via a system call, a request for a pool of memory;
- determining a size of the requested pool of memory;
- creating a dummy memory segment, wherein a size of the dummy memory segment is larger than the size of the requested pool of memory;
- filling the dummy memory segment with one or more pages, based on the determined size of the requested pool of memory;
- and
- deleting the dummy memory segment, wherein deleting the dummy memory segment comprises:
- sorting the one or more pages of the dummy memory segment according to each associated affinity domain of each page, wherein each affinity domain comprises a cluster of processors and memory local to the cluster of processors;
- sending requests to zero the sorted one or more pages to one or more software threads that are attached to the respective affinity domain;
- and
- waiting for a message, from the software threads in each affinity domain, indicating that all requests to zero have been processed before returning to a system caller of the system call.
Dependencies are inferred from the claim text.