Systems and methods implementing non-shared page tables for sharing memory resources managed by a main operating system with accelerator devices
AssigneeAdvanced Micro Devices, Inc.
InventorsPatryk Kaminski, Thomas Woller, Keith Lowery, Erich Boleyn
Life of this patent
Estimating the term…
Abstract
Systems and methods are provided that utilize non-shared page tables to allow an accelerator device to share physical memory of a computer system that is managed by and operates under control of an operating system. The computer system can include a multi-core central processor unit. The accelerator device can be, for example, an isolated core processor device of the multi-core central processor unit that is sequestered for use independently of the operating system, or an external device that is communicatively coupled to the computer system.
Claims32
A method for allowing an accelerator device to share physical memory of a computer system that is managed by and operates under control of an operating system of the computer system, the method comprising:
- creating a plurality of operating system (OS) page tables for memory management;
- creating, at a driver, a plurality of non-shared page tables maintained by the driver, wherein the non-shared page tables are independent of the operating system, are distinct from the OS page tables, and are to be used exclusively by the accelerator device to share the physical memory;
- pinning memory pages referenced in the plurality of non-shared page tables to prevent reuse of the memory pages referenced in the non-shared page tables;
- maintaining a global list of and a global counter for pinned memory pages for processes that interact with the accelerator device;
- and
- maintaining local lists of and local counters for pinned memory pages for respective processes that interact with the accelerator device.
A method for allowing an accelerator device to share physical memory of a computer system that is managed by and operates under control of an operating system of the computer system, the method comprising:
- creating a plurality of operating system (OS) page tables for memory management;
- creating, at a driver, a plurality of non-shared page tables maintained by the driver, wherein the non-shared page tables are independent of the operating system, are distinct from the OS page tables, and are to be used exclusively by the accelerator device to share the physical memory;
- using the non-shared page tables, maintained by the driver, to translate virtual memory addresses assigned to processes to physical memory addresses in the physical memory when the accelerator device needs to access a block of memory in a virtual memory address space (VMAS) assigned to the process;
- pinning memory pages referenced in the plurality of non-shared page tables to prevent reuse of the memory pages referenced in the non-shared page tables;
- maintaining a global list of and a global counter for pinned memory pages for processes that interact with the accelerator device;
- and
- maintaining local lists of and local counters for pinned memory pages for respective processes that interact with the accelerator device.
A system, comprising:
- an accelerator device;
- a computer system communicatively coupled to the accelerator device, the computer system comprising:
- a main operating system (OS) designed to create a plurality of OS page tables for memory management;
- and
- shared physical memory that is managed by and operates under control of the main OS;
- and
- a driver for the accelerator device to:
- create and maintain a plurality of non-shared page tables at the driver that are independent of the main OS, are distinct from the OS page tables, and are to be used exclusively by the accelerator device to share the shared physical memory;
- pin memory pages referenced in the plurality of non-shared page tables to prevent reuse of the memory pages referenced in the non-shared page tables;
- maintain a global list of and a global counter for pinned memory pages for processes that interact with the accelerator device;
- and
- maintain local lists of and local counters for pinned memory pages for respective processes that interact with the accelerator device.
A system, comprising:
- an accelerator device;
- a computer system communicatively coupled to the accelerator device, the computer system comprising:
- a main operating system (OS) designed to create a plurality of OS page tables for memory management;
- shared physical memory that is managed by and operates under control of the main OS;
- and
- a driver for the accelerator device to:
- create and maintain a plurality of non-shared page tables at the driver that are independent of the main OS, are distinct from the OS page tables, and are to be used exclusively by the accelerator device to share the shared physical memory;
- pin memory pages referenced in the plurality of non-shared page tables to prevent reuse of the memory pages referenced in the non-shared page tables;
- maintain a global list of and a global counter for pinned memory pages for processes that interact with the accelerator device;
- and
- maintain local lists of and local counters for pinned memory pages for respective processes that interact with the accelerator device,
- wherein the driver uses non-shared page tables for virtual memory address translation to translate virtual memory addresses assigned to a process to physical memory addresses in the shared physical memory when the accelerator device needs to access a block of memory in a virtual memory address space (VMAS) assigned to the process.
Dependencies are inferred from the claim text.