IP Library › Granted Patent US 10,402,341
Granted Patent B2
US 10,402,341 · App. 15/591,469 · Granted Sep 3, 2019

Kernel-assisted inter-process data transfer

Inventors: Marcel Apfelbaum (Raanana, IL); Gal Hammer (Raanana, IL)
Assignee: Red Hat Israel, Ltd.
G06F12/1009G06F2212/1016G06F2212/65G06F2212/68
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 10,402,341
App. No.
15/591,469
Granted
Sep 3, 2019
Kind
B2
Abstract

Inter-process data transfer on a host computing device is disclosed. A kernel module executing on the host computing device receives, from a first process, buffer registration information that identifies a virtual address of a receive buffer and a length of the receive buffer. The kernel module determines a first physical memory address that corresponds to the virtual address of the receive buffer. The kernel module receives, from a second process, a send request to send data to the first process, the send request including a virtual address of a send buffer, a length of the data, and a destination identifier that is associated with the receive buffer. The kernel module determines a second physical memory address that corresponds to the virtual address of the send buffer and transfers the data directly from the second physical memory address to the first physical memory address.

Claims (64)

1. A method for inter-process data transfer on a host computing device comprising:

receiving, by a kernel module executing on the host computing device, from a first hypervisor process that provides a first emulated network card to a first virtual machine, buffer registration information that identifies a virtual address of a first emulated network card receive buffer and a length of the first emulated network card receive buffer;

determining, by the kernel module, a first physical memory address that corresponds to the virtual address of the first emulated network card receive buffer;

receiving, by the kernel module from a second hypervisor process that provides a second emulated network card to a second virtual machine, a send request to send data to the first hypervisor process, the send request including a virtual address of a second emulated network card send buffer, a length of the data, and a destination identifier that is associated with the first emulated network card receive buffer;

determining, by the kernel module, a second physical memory address that corresponds to the virtual address of the second emulated network card send buffer; and

transferring, by the kernel module, the data directly from the second physical memory address to the first physical memory address.

2. The method of claim 1 wherein transferring, by the kernel module, the data directly from the second physical memory address to the first physical memory address further comprises transferring, by the kernel module, the data directly from the second physical memory address to the first physical memory address without making any intermediate copies of the data.

3. The method of claim 1 wherein the kernel module is configured to directly access a memory on the host computing device via a physical memory address, and the first hypervisor process and the second hypervisor process are configured to only access the memory on the host computing device via virtual addresses.

4. The method of claim 1 further comprising:

storing, by the kernel module, the first physical memory address, the length of the first emulated network card receive buffer, and the destination identifier that is associated with the first emulated network card receive buffer in a data structure; and

wherein transferring the data directly from the second physical memory address to the first physical memory address further comprises:

accessing the data structure;

determining that the destination identifier received from the second hypervisor process matches the destination identifier associated in the data structure with the first emulated network card receive buffer; and

obtaining the first physical memory address from the data structure.

5. The method of claim 1 wherein the buffer registration information comprises a plurality of virtual addresses that correspond to a plurality of first emulated network card receive buffers, and a plurality of lengths that correspond to ones of the plurality of first emulated network card receive buffers, and further comprising:

for each virtual address of the plurality of virtual addresses:

determining a first physical memory address that corresponds to the virtual address; and

storing the first physical memory address, the length of the first emulated network card receive buffer, and the destination identifier that is associated with the first emulated network card receive buffer in a data structure.

6. The method of claim 1 further comprising notifying, by the kernel module, the first hypervisor process that the data has been transferred from the second physical memory address to the first physical memory address.

7. The method of claim 1 further comprising:

receiving, by the second hypervisor process, a transmission request from the second virtual machine to transmit a message via the second emulated network card, the transmission request including a second virtual machine guest address that points to the second emulated network card send buffer containing the message;

analyzing, by the second hypervisor process, the transmission request;

determining that the message is destined for the first emulated network card receive buffer; and

communicating the send request to the kernel module, wherein the virtual address of the send buffer in the send request comprises a virtual address of the second hypervisor process that points to the second emulated network card send buffer, the length of the data in the send request comprises a length of the second emulated network card send buffer, and the destination identifier in the send request comprises the destination identifier associated with the first emulated network card receive buffer.

8. The method of claim 7 wherein the second hypervisor process communicates the send request to the kernel module in lieu of communicating the transmission request to a networking subsystem of the host computing device.

9. The method of claim 7 further comprising translating, by the second hypervisor process, the second virtual machine guest address to the virtual address of the second hypervisor process.

10. The method of claim 7 further comprising:

determining, by the second hypervisor process, a destination media access control address associated with the transmission request; and

determining that the destination media access control address is associated with the destination identifier that is associated with the first emulated network card receive buffer.

11. The method of claim 7 further comprising:

notifying the first hypervisor process, by the kernel module, that the message has been transferred from the second physical memory address to the first physical memory address; and

notifying, by the first hypervisor process, the first virtual machine that the message has arrived at the first emulated network card.

12. A host computing device, comprising:

a memory; and

a processor device coupled to the memory to:

receive, by a kernel module, from a first hypervisor process that provides a first emulated network card to a first virtual machine, buffer registration information that identifies a virtual address of a first emulated network card receive buffer and a length of the first emulated network card receive buffer;

determine, by the kernel module, a first physical memory address that corresponds to the virtual address of the first emulated network card receive buffer;

receive, by the kernel module from a second hypervisor process that provides a second emulated network card to a second virtual machine, a send request to send data to the first hypervisor process, the send request including a virtual address of a second emulated network card send buffer, a length of the data, and a destination identifier that is associated with the first emulated network card receive buffer;

determine, by the kernel module, a second physical memory address that corresponds to the virtual address of the second emulated network card send buffer; and

transfer, by the kernel module, the data directly from the second physical memory address to the first physical memory address.

13. The host computing device of claim 12 wherein the kernel module is configured to directly access the memory on the host computing device via a physical memory address, and the first hypervisor process and the second hypervisor process are configured to only access the memory on the host computing device via virtual addresses.

14. The host computing device of claim 12 wherein the processor device is further to:

store, by the kernel module, the first physical memory address, the length of the first emulated network card receive buffer, and the destination identifier that is associated in the data structure with the first emulated network card receive buffer in a data structure; and

wherein to transfer the data directly from the second physical memory address to the first physical memory address the processor device is further to:

access the data structure;

determine that the destination identifier received from the second hypervisor process matches the destination identifier associated in the data structure with the first emulated network card receive buffer; and

obtain the first physical memory address from the data structure.

15. The host computing device of claim 12 wherein the processor device is further to:

receive, by the second hypervisor process, a transmission request from the second virtual machine to transmit a message via the second emulated network card, the transmission request including a second virtual machine guest address that points to the second emulated network card send buffer containing the message;

analyze, by the second hypervisor process, the transmission request;

determine that the message is destined for the first emulated network card receive buffer; and

communicate the send request to the kernel module, wherein the virtual address of the send buffer in the send request comprises a virtual address of the second hypervisor process that points to the second emulated network card send buffer, the length of the data in the send request comprises a length of the second emulated network card send buffer, and the destination identifier in the send request comprises the destination identifier associated with the first emulated network card receive buffer.

16. A computer program product stored on a non-transitory computer-readable storage medium and including instructions to cause a processor device to:

receive, by a kernel module, from a first hypervisor process that provides a first emulated network card to a first virtual machine, buffer registration information that identifies a virtual address of a first emulated network card receive buffer and a length of the first emulated network card receive buffer;

determine, by the kernel module, a first physical memory address that corresponds to the virtual address of the first emulated network card receive buffer;

receive, by the kernel module from a second hypervisor process that provides a second emulated network card to a second virtual machine, a send request to send data to the first hypervisor process, the send request including a virtual address of a second emulated network card send buffer, a length of the data, and a destination identifier that is associated with the first emulated network card receive buffer;

determine, by the kernel module, a second physical memory address that corresponds to the virtual address of the second emulated network card send buffer; and

transfer, by the kernel module, the data directly from the second physical memory address to the first physical memory address.

17. The computer program product of claim 16 wherein the instructions further cause the processor device to:

store, by the kernel module, the first physical memory address, the length of the first emulated network card receive buffer, and the destination identifier that is associated with the first emulated network card receive buffer in a data structure; and

wherein to transfer the data directly from the second physical memory address to the first physical memory address the instructions further cause the processor device to:

access the data structure;

determine that the destination identifier received from the second hypervisor process matches the destination identifier associated in the data structure with the first emulated network card receive buffer; and

obtain the first physical memory address from the data structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 10, 2017
From: APFELBAUM, MARCEL; HAMMER, GAL
To: RED HAT ISRAEL, LTD.
Reel/Frame 042323/0316 →
Continuity (1)
Related Publication 20180329828A1 · Nov 15, 2018