IP Library › Granted Patent US 11,016,692
Granted Patent B2
US 11,016,692 · App. 16/567,747 · Granted May 25, 2021

Dynamically switching between memory copy and memory mapping to optimize I/O performance

Inventors: Lokesh M. Gupta (Tucson, AZ); Kevin J. Ash (Tucson, AZ); Brian A. Rinaldi (Tucson, AZ); Kyler A. Anderson (Sahuarita, AZ); Matthew J. Kalos (Tucson, AZ)
Assignee: International Business Machines Corporation
G06F3/0647G06F3/0613G06F3/0673G06F12/0646G06F13/1668G06F13/4204G06F2212/1024G06F2212/608G06F2213/0024
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,016,692
App. No.
16/567,747
Granted
May 25, 2021
Kind
B2
Abstract

A method to dynamically switch between data transfer techniques includes receiving an I/O request and computing a cost of executing the I/O request using a memory copy data transfer technique. The memory copy data transfer technique copies cache segments associated with the I/O request from cache memory to a permanently mapped memory, which is permanently mapped to a bus address window. The method also computes a cost of executing the I/O request using a memory mapping data transfer technique. The memory mapping data transfer technique temporarily maps cache segments associated with the I/O request from the cache memory to the bus address window. The method uses one of the memory copy data transfer technique and the memory mapping data transfer technique to transfer cache segments associated with the I/O request, depending on which one is less costly. A corresponding system and computer program product are also disclosed.

Claims (37)

1. A method for dynamically switching between memory copy and memory mapping data transfer techniques to improve I/O performance, the method comprising:

receiving an I/O request;

computing a cost of executing the I/O request using a memory copy data transfer technique, the memory copy data transfer technique copying cache segments associated with the I/O request from cache memory to a permanently mapped memory, wherein the permanently mapped memory is permanently mapped to a bus address window;

computing a cost of executing the I/O request using a memory mapping data transfer technique, the memory mapping data transfer technique temporarily mapping cache segments associated with the I/O request from the cache memory to the bus address window;

using the memory copy data transfer technique to transfer cache segments associated with the I/O request in the event using the memory copy data transfer technique is less costly than using the memory mapping data transfer technique; and

using the memory mapping data transfer technique to transfer cache segments associated with the I/O request in the event using the memory mapping data transfer technique is less costly than using the memory copy data transfer technique.

2. The method of claim 1 , wherein the bus address window is a Peripheral Component Interconnect (PCI) bus address window.

3. The method of claim 1 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises calculating a number of cache segments to copy to the permanently mapped memory.

4. The method of claim 1 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises determining copy latency between the cache memory and the permanently mapped memory.

5. The method of claim 4 , wherein determining the copy latency between the cache memory and the permanently mapped memory comprises determining locations of the cache memory and the permanently mapped memory.

6. The method of claim 1 , wherein computing the cost of executing the I/O request using the memory mapping data transfer technique comprises estimating an amount of time needed to at least one of map and unmap cache segments associated with the I/O request from the cache memory to the bus address window.

7. The method of claim 1 , wherein the cache segments are not all contiguous in the cache memory.

8. A computer program product for dynamically switching between memory copy and memory mapping data transfer techniques to improve I/O performance, the computer program product comprising a computer-readable medium having computer-usable program code embodied therein, the computer-usable program code configured to perform the following when executed by at least one processor:

receive an I/O request;

compute a cost of executing the I/O request using a memory copy data transfer technique, the memory copy data transfer technique copying cache segments associated with the I/O request from cache memory to a permanently mapped memory, wherein the permanently mapped memory is permanently mapped to a bus address window;

compute a cost of executing the I/O request using a memory mapping data transfer technique, the memory mapping data transfer technique temporarily mapping cache segments associated with the I/O request from the cache memory to the bus address window;

use the memory copy data transfer technique to transfer cache segments associated with the I/O request in the event using the memory copy data transfer technique is less costly than using the memory mapping data transfer technique; and

use the memory mapping data transfer technique to transfer cache segments associated with the I/O request in the event using the memory mapping data transfer technique is less costly than using the memory copy data transfer technique.

9. The computer program product of claim 8 , wherein the bus address window is a Peripheral Component Interconnect (PCI) bus address window.

10. The computer program product of claim 8 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises calculating a number of cache segments to copy to the permanently mapped memory.

11. The computer program product of claim 8 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises determining copy latency between the cache memory and the permanently mapped memory.

12. The computer program product of claim 11 , wherein determining the copy latency between the cache memory and the permanently mapped memory comprises determining locations of the cache memory and the permanently mapped memory.

13. The computer program product of claim 8 , wherein computing the cost of executing the I/O request using the memory mapping data transfer technique comprises estimating an amount of time needed to at least one of map and unmap cache segments associated with the I/O request from the cache memory to the bus address window.

14. The computer program product of claim 8 , wherein the cache segments are not all contiguous in the cache memory.

15. A system for dynamically switching between memory copy and memory mapping data transfer techniques to improve I/O performance, the system comprising:

at least one processor;

at least one memory device coupled to the at least one processor and storing instructions for execution on the at least one processor, the instructions causing the at least one processor to:

receive an I/O request;

compute a cost of executing the I/O request using a memory copy data transfer technique, the memory copy data transfer technique copying cache segments associated with the I/O request from cache memory to a permanently mapped memory, wherein the permanently mapped memory is permanently mapped to a bus address window;

compute a cost of executing the I/O request using a memory mapping data transfer technique, the memory mapping data transfer technique temporarily mapping cache segments associated with the I/O request from the cache memory to the bus address window;

use the memory copy data transfer technique to transfer cache segments associated with the I/O request in the event using the memory copy data transfer technique is less costly than using the memory mapping data transfer technique; and

use the memory mapping data transfer technique to transfer cache segments associated with the I/O request in the event using the memory mapping data transfer technique is less costly than using the memory copy data transfer technique.

16. The system of claim 15 , wherein the bus address window is a Peripheral Component Interconnect (PCI) bus address window.

17. The system of claim 15 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises calculating a number of cache segments to copy to the permanently mapped memory.

18. The system of claim 15 , wherein computing the cost of executing the I/O request using the memory copy data transfer technique comprises determining copy latency between the cache memory and the permanently mapped memory.

19. The system of claim 18 , wherein determining the copy latency between the cache memory and the permanently mapped memory comprises determining locations of the cache memory and the permanently mapped memory.

20. The system of claim 15 , wherein computing the cost of executing the I/O request using the memory mapping data transfer technique comprises estimating an amount of time needed to at least one of map and unmap cache segments associated with the I/O request from the cache memory to the bus address window.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 11, 2019
From: GUPTA, LOKESH M.; ASH, KEVIN J.; RINALDI, BRIAN A.; ANDERSON, KYLER A.; KALOS, MATTHEW J.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 050345/0019 →
Continuity (1)
Related Publication 20210072918A1 · Mar 11, 2021