Virtualization of Graphics Resources and Thread Blocking
AssigneeApple Inc.
InventorsJohn Stauffer, Robert Beretta
Life of this patent
Estimating the term…
Abstract
Virtualization of graphics resources and thread blocking is disclosed. In one exemplary embodiment, a system and method of a kernel in an operating system including generating a data structure having an identifier of a graphics resource assigned to a physical memory location in video memory, and blocking access to the physical memory location if a data within the physical memory location is in transition between video memory and system memory wherein a client application accesses memory in the system memory directly and accesses memory in the video memory through a virtual memory map.
Claims19
A machine-implemented method, comprising:
- requesting, by an application, to write data from application data in a system memory to a video memory by using a virtual address of a portion of the video memory;
- translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the portion of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- and
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in the system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- writing, after the entry is changed, the data to the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A non-transitory machine readable storage medium having instructions to cause a machine to perform a machine-implemented method, the method comprising:
- requesting, by an application, to write data from application data in a system memory to a video memory by using a virtual address of a portion of the video memory;
- translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the portion of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- and
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- writing, after the entry is changed, the data to the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
An apparatus, comprising:
- means for requesting, by an application, to write data from application data in a system memory to a video memory by using a virtual address of a portion of the video memory;
- means for translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the portion of the video memory;
- means for determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- means for preventing access to the entry while the entry is being changed;
- means for selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- means for writing, after the entry is changed, the data to the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A machine implemented method comprising:
- receiving, from an application, a request to write from application data in a system memory data to a video memory, the request providing a virtual address of at least a portion of the video memory;
- translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the portion of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- storing, after the entry is changed, the data in the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A non-transitory machine readable medium having instructions to cause a machine to perform a machine implemented method, the method comprising:
- receiving, from an application, a request to write data from application data in a system memory to a video memory, the request providing a virtual address of at least a portion of the video memory;
- translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the portion of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- storing, after the entry is changed, the data in the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A graphics processing system comprising:
- a graphics processing unit;
- a video memory coupled to the graphics processing unit, the graphics processing unit receiving, from an application, a request to write data from application data in a system memory to the video memory, the request providing a virtual address of at least a portion of the video memory, and the graphics processing unit translating, using a virtual memory map of the video memory, the virtual address to a real physical address of the video memory, determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map, preventing access to the entry while the entry is being changed, selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the portion of the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the portion of the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus, and storing, after the entry is changed, the data in the portion of the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A machine implemented method comprising:
- requesting, by an application, to write data from application data in a system memory to a video memory, the requesting providing a virtual address of the video memory which will be translated, using a virtual memory map of the video memory, to a physical address of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- and
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- causing the data to be transmitted, after the entry is changed, to the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
A non-transitory machine readable medium having instructions to cause a machine to perform a machine implemented method, the method comprising:
- requesting, by an application, to write data from application data in a system memory to a video memory, the requesting providing a virtual address of the video memory which will be translated, using a virtual memory map of the video memory, to a physical address of the video memory;
- determining that an entry in the virtual memory map corresponding to a mapping between the virtual address and the real physical address is being changed within the virtual memory map;
- and
- preventing access to the entry while the entry is being changed;
- selecting a write path through a system memory controller based on a comparison of available performances of a graphics controller bus and a system memory bus, wherein selecting a write path causes a processor to write the data from the system memory to a buffer in a system memory through the system memory bus and to subsequently write the data from the buffer to the video memory through the graphics controller bus, and wherein selecting a fast write path causes the processor to directly write the data from the system memory to the video memory through the graphics controller bus without previously writing the data to the buffer through the system memory bus;
- and
- causing the data to be transmitted, after the entry is changed, to the video memory using the fast write path if the available performance of the graphics controller bus is faster than the available performance of the system memory bus.
Dependencies are inferred from the claim text.