IP Library Granted Patent US 9,378,059
Granted Patent B2
US 9,378,059 · App. 14/436,822 · Granted Jun 28, 2016

Multi-threaded, lockless data parallelization

Inventors: Raymond J. Huetter (San Mateo, CA); Craig A McIntyre (San Mateo, CA); Myvan Quoc (Fremont, CA); David I. Cracknell (Cupertino, CA); Alka Yamarti (Gachibowi, IN); David I Gotwisner (Castro Valley, CA)
Assignee: Argyle Data, Inc.
G06F9/5016G06F9/524G06F9/544G06F17/30321
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 9,378,059
App. No.
14/436,822
Granted
Jun 28, 2016
Kind
B2
Abstract

In general, techniques are described for parallelizing a high-volume data stream using a data structure that enables lockless access by a multi-threaded application. In some examples, a multi-core computing system includes an application that concurrently executes multiple threads on cores of the system. The multiple threads include one or more send threads each associated with a different lockless data structure that each includes both a circular buffer and a queue. One or more receive threads serially retrieve incoming data from a data stream or input buffer, copy data blocks to one of the circular buffers, and push metadata for the copied data blocks to the queue. Each of the various send threads, concurrent to the operation of the receive threads, dequeues the next metadata from its associated queue, reads respective blocks of data from its associated circular buffers based on metadata information, and offloads the block to a server.

Claims (133)

1. A data offload system comprising:

a multi-core hardware processor having a plurality of execution cores;

an offload application to execute on the multi-core hardware processor, wherein the offload application comprises a plurality of threads;

an input interface to receive an incoming data stream and write a plurality of data blocks of the incoming data stream to an input buffer accessible to the offload application;

a first lockless buffer and a second lockless buffer;

a receive thread of the plurality of threads to read a first one the plurality of data blocks from the input buffer and to read a second one the plurality of data blocks from the input buffer,

wherein the receive thread performs a first write operation to write the first data block to the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the receive thread performs the first write operation, and

wherein the receive thread performs a second write operation to write the second data block to the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the receive thread performs the second write operation;

a first send thread of the plurality of threads to perform a first send operation to send the first data block from the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the first send thread performs the first send operation; and

a second send thread of the plurality of threads to perform a second send operation to send the second data block from the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the second send thread performs the second send operation.

2. The data offload system of claim 1 ,

wherein the receive thread reads a third one of the plurality of data blocks from the input buffer, and

wherein the receive thread performs a third write operation to write the third data block to the first lockless buffer concurrently with the first send thread performing the first send operation.

3. The data offload system of claim 1 ,

wherein the first lockless buffer comprises a First-In-First-Out (FIFO) data structure and a circular buffer,

wherein, to perform the first write operation, the receive thread writes metadata for the first data block to the FIFO data structure and writes the first data block to the circular buffer.

4. The data offload system of claim 3 ,

wherein the FIFO data structure comprises a plurality of FIFO entries,

wherein the FIFO data structure is associated with a head member usable for determining a head FIFO entry of the plurality of FIFO entries, and

wherein the FIFO data structure is associated with a tail member usable for determining a tail FIFO entry of the plurality of FIFO entries.

5. The data offload system of claim 4 , wherein, to perform the first write operation, the receive thread:

determines the head FIFO entry of the FIFO data structure using the head member;

copies the first data block from the input buffer to the circular buffer;

sets a value for an entry number stored by the head FIFO entry to indicate the head FIFO entry is not empty; and

subsequent to setting the value for the entry number, increments the head member.

6. The data offload system of claim 5 , wherein to set the value for the entry number the receive thread sets the entry number to a value of the head member.

7. The data offload system of claim 5 ,

wherein the receive thread:

reads a third one of the plurality of data blocks from the input buffer,

determines a new head FIFO entry of the FIFO data structure using the incremented head member;

determines an entry number stored by the new head FIFO entry indicates the new head FIFO entry is not empty; and

in response to determining the entry number stored by the new head FIFO entry indicates the new head FIFO entry is not empty, throws an exception to indicate the first data buffer is overflowed.

8. The data offload system of claim 4 , wherein, to perform the first send operation, the first send thread:

determines the tail FIFO entry of the FIFO data structure using the tail member,

identifies a location of the first data block in the circular buffer using metadata for the first data block stored by the tail FIFO entry;

sends the first data block by an output interface of the data offload system; and

increments the tail member.

9. The data offload system of claim 8 , wherein, to perform the first send operation, the first send thread:

sets an entry number for the tail FIFO entry to indicate the tail FIFO entry is empty.

10. The data offload system of claim 8 , wherein the first send thread:

determines whether an entry number for the tail FIFO entry is equal to a value of the tail member;

in response to determining the entry number for the tail FIFO entry is equal to a value of the tail member, performs the first send operation; and

in response to determining the entry number for the tail FIFO entry is not equal to a value of the tail member, sleeps.

11. The data offload system of claim 4 , wherein to perform the first write operation the receive thread:

determines the head FIFO entry of the FIFO data structure using the head member;

determines whether the head FIFO entry of the FIFO data structure is taken;

in response to determining the head FIFO entry of the FIFO data structure is not taken:

copies the first data block from the input buffer to the circular buffer;

sets a value for an entry number stored by the head FIFO entry to indicate the head FIFO entry is not empty; and

increments the head member.

12. The data offload system of claim 11 ,

wherein each of the plurality of FIFO entries includes a length of data block member variable,

wherein to determine whether the head FIFO entry of the FIFO data structure is taken the receive thread determines whether the length of data block member variable of the head FIFO entry indicates another receive thread has modified the length of data block member variable of the head FIFO entry.

13. The data offload system of claim 11 , wherein the receive thread is a first receive thread, the data offload system further comprising:

a second receive thread to read a third one of the plurality of data blocks from the input buffer,

wherein the second receive thread performs a third write operation to write the third data block to the first lockless buffer concurrently with the first receive thread performing the first write operation.

14. The data offload system of claim 1 , further comprising:

a plurality of offload groups, wherein each of the plurality of offload groups comprises:

an instance of the first lockless buffer;

an instance of the second lockless buffer;

an instance of the receive thread;

an instance of the first send thread; and

an instance of the second send thread.

15. The data offload system of claim 1 ,

wherein the first lockless buffer comprises a contiguous memory space, wherein the receive thread reads a third one of the plurality of data blocks from the input buffer and performs a third write operation to write the third data block to a memory location of the first lockless buffer that is contiguous to a memory location of the first lockless buffer that is occupied by the first data block, and

wherein the first send thread, to perform the first send operation and without locking the first lockless buffer, reads the first data block and third data block from the first lockless buffer using a single read operation and sends the first data block and the third data block from the data offload system.

16. A method comprising:

receiving an incoming data stream;

writing a plurality of data blocks of the incoming data stream to an input buffer;

executing, with a multi-core hardware processor having a plurality of execution cores, an offload application that includes a first lockless buffer, a second lockless buffer, and a plurality of threads that include a first receive thread, a first send thread, and a second send thread;

reading, with the receive thread, a first one the plurality of data blocks and a second one the plurality of data blocks from the input buffer;

performing a first write operation, with the receive thread, to write the first data block to the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the receive thread performs the first write operation;

performing a second write operation, with the receive thread, to write the second data block to the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the receive thread performs the second write operation;

performing a first send operation, with the first send thread, to send the first data block from the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the first send thread performs the first send operation; and

performing a second send operation, with the second send thread, to send the second data block from the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the second send thread performs the second send operation.

17. The method of claim 16 , further comprising:

reading, with the receive thread, a third one of the plurality of data blocks from the input buffer, and

performing a third write operation, with the receive thread, to write the third data block to the first lockless buffer concurrently with the first send thread performing the first send operation.

18. The method of claim 16 ,

wherein the first lockless buffer comprises a First-In-First-Out (FIFO) data structure and a circular buffer,

wherein, to perform the first write operation, the receive thread writes metadata for the first data block to the FIFO data structure and writes the first data block to the circular buffer.

19. The method of claim 18 ,

wherein the FIFO data structure comprises a plurality of FIFO entries,

wherein the FIFO data structure is associated with a head member usable for determining a head FIFO entry of the plurality of FIFO entries, and

wherein the FIFO data structure is associated with a tail member usable for determining a tail FIFO entry of the plurality of FIFO entries.

20. The method of claim 19 , wherein performing the first write operation comprises:

determining the head FIFO entry of the FIFO data structure using the head member;

copying the first data block from the input buffer to the circular buffer;

setting a value for an entry number stored by the head FIFO entry to indicate the head FIFO entry is not empty; and

subsequent to setting the value for the entry number, incrementing the head member.

21. The method of claim 20 , wherein to set the value for the entry number the receive thread sets the entry number to a value of the head member.

22. The method of claim 20 , further comprising:

reading, with the receive thread, a third one of the plurality of data blocks from the input buffer;

determining, with the receive thread, a new head FIFO entry of the FIFO data structure using the head member,

determining an entry number stored by the new head FIFO entry indicates the new head FIFO entry is not empty; and

in response to determining the entry number stored by the new head FIFO entry indicates the new head FIFO entry is not empty, throwing an exception to indicate the first data buffer is overflowed.

23. The method of claim 19 , wherein performing the first send operation comprises:

determining the tail FIFO entry of the FIFO data structure using the tail member;

identifying a location of the first data block in the circular buffer using metadata for the first data block stored by the tail FIFO entry;

sending the first data block by an output interface coupled to the multi-core hardware processor; and

incrementing the tail member.

24. The method of claim 23 , wherein performing the first send operation comprises:

setting an entry number for the tail FIFO entry to indicate the tail FIFO entry is empty.

25. The method of claim 23 , further comprising:

determining, with the first send thread, whether an entry number for the tail FIFO entry is equal to a value of the tail member,

in response to determining the entry number for the tail FIFO entry is equal to a value of the tail member, performing the first send operation; and

in response to determining the entry number for the tail FIFO entry is not equal to a value of the tail member, sleeping.

26. The method of claim 19 , wherein performing the first write operation comprises:

determining the head FIFO entry of the FIFO data structure using the head member;

determining whether the head FIFO entry of the FIFO data structure is taken;

in response to determining the head FIFO entry of the FIFO data structure is not taken:

copying the first data block from the input buffer to the circular buffer;

setting a value for an entry number stored by the head FIFO entry to indicate the head FIFO entry is not empty; and

subsequent to setting the value for the entry number, incrementing the head member.

27. The method of claim 26 ,

wherein each of the plurality of FIFO entries includes a length of data block member variable,

wherein determining whether the head FIFO entry of the FIFO data structure is taken comprises determining whether the length of data block member variable of the head FIFO entry indicates another receive thread has modified the length of data block member variable of the head FIFO entry.

28. The method of claim 26 , wherein the receive thread is a first receive thread, method further comprising:

reading, with a second receive thread, a third one of the plurality of data blocks from the input buffer, and

performing, with the second receive thread, a third write operation to write the third data block to the first lockless buffer concurrently with the first receive thread performing the first write operation.

29. The method of claim 16 , wherein the first lockless buffer comprises a contiguous memory space, the method further comprising:

reading, with the receive thread, a third one of the plurality of data blocks from the input buffer, and

performing a third write operation, with the receive thread, to write the third data block to a memory location of the first lockless buffer that is contiguous to a memory location occupied by the first data block,

wherein performing the first send operation comprises reading the first data block and third data block from the first lockless buffer using a single read operation and without locking the first lockless buffer and sending the first data block and the third data block by an output interface coupled to the multi-core hardware processor.

30. A non-transitory computer-readable medium comprising instructions for causing one or more processors to:

receive an incoming data stream;

write a plurality of data blocks of the incoming data stream to an input buffer;

execute an offload application that includes a first lockless buffer, a second lockless buffer, and a plurality of threads that include a first receive thread, a first send thread, and a second send thread;

read, with the receive thread, a first one the plurality of data blocks and a second one the plurality of data blocks from the input buffer;

perform a first write operation, with the receive thread, to write the first data block to the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the receive thread performs the first write operation;

perform a second write operation, with the receive thread, to write the second data block to the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the receive thread performs the second write operation;

perform a first send operation, with the first send thread, to send the first data block from the first lockless buffer without locking the first lockless buffer to allow access to the first lockless buffer by other threads of the plurality of threads while the first send thread performs the first send operation; and

perform a second send operation, with the second send thread, to send the second data block from the second lockless buffer without locking the second lockless buffer to allow access to the second lockless buffer by other threads of the plurality of threads while the second send thread performs the second send operation.

Assignments (15)
RELEASE OF SECURITY INTEREST IN ADDITIONAL COLLATERAL RECORDED AT REEL 069116 AND FRAME 0093 Recorded Jul 31, 2025
From: GLAS USA LLC
To: ARGYLE DATA, INC.
Reel/Frame 072306/0567 →
GRANT OF SECURITY INTEREST - PATENTS Recorded Jul 29, 2025
From: MAVENIR NETWORKS, INC.; MAVENIR SYSTEMS, INC.; ARGYLE DATA, INC.; MAVENIR, INC.; AQUTO CORPORATION; MAVENIR IPA UK LIMITED; MAVENIR SYSTEMS UK LIMITED; MAVENIR LTD.; MAVENIR US INC.
To: GLAS USA LLC
Reel/Frame 072245/0764 →
RELEASE (REEL 060640 / FRAME 0085) Recorded Jul 29, 2025
From: JPMORGAN CHASE BANK, N.A.
To: ARGYLE DATA, INC.
Reel/Frame 072262/0323 →
RELEASE (REEL 057221 / FRAME 0847) Recorded Jul 29, 2025
From: JPMORGAN CHASE BANK, N.A.
To: ARGYLE DATA, INC.
Reel/Frame 072262/0337 →
RELEASE OF SECURITY INTEREST IN COLLATERAL RECORDED AT REEL 067554 AND FRAME 0526 Recorded Jul 29, 2025
From: WILMINGTON SAVINGS FUND SOCIETY, FSB
To: ARGYLE DATA, INC
Reel/Frame 072263/0036 →
SECURITY INTEREST Recorded Jul 28, 2025
From: MAVENIR NETWORKS, INC.; MAVENIR SYSTEMS, INC.; ARGYLE DATA, INC.; MAVENIR, INC.; AQUTO CORPORATION; MAVENIR IPA UK LIMITED; MAVENIR SYSTEMS UK LIMITED; MAVENIR LTD.; MAVENIR US INC.
To: BLUE TORCH FINANCE LLC
Reel/Frame 072268/0439 →
RELEASE OF SECURITY INTEREST RECORDED AT R/F 068453/0451 Recorded Oct 4, 2024
From: WILMINGTON SAVINGS FUND SOCIETY, FSB
To: ARGYLE DATA, INC.
Reel/Frame 069116/0031 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Oct 4, 2024
From: ARGYLE DATA, INC.
To: GLAS USA LLC
Reel/Frame 069116/0093 →
SECURITY INTEREST Recorded Aug 30, 2024
From: ARGYLE DATA, INC.
To: WILMINGTON SAVINGS FUND SOCIETY, FSB
Reel/Frame 068453/0451 →
SECURITY INTEREST Recorded May 29, 2024
From: ARGYLE DATA, INC.
To: WILMINGTON SAVINGS FUND SOCIETY, FSB
Reel/Frame 067554/0526 →
SECURITY AGREEMENT Recorded Jul 13, 2022
From: ARGYLE DATA, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 060640/0085 →
SECURITY AGREEMENT Recorded Aug 18, 2021
From: ARGYLE DATA, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 057221/0847 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT COLLATERAL - RELEASE OF 046139.0274 Recorded Aug 18, 2021
From: GOLDMAN SACHS LENDING PARTNERS LLC, AS COLLATERAL AGENT
To: ARGYLE DATA, INC.
Reel/Frame 057222/0462 →
GRANT OF SECURITY INTEREST IN PATENTS Recorded May 14, 2018
From: ARGYLE DATA, INC.
To: GOLDMAN SACHS LENDING PARTNERS LLC, AS COLLATERAL AGENT
Reel/Frame 046139/0274 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 23, 2018
From: HUETTER, RAYMOND J.; MCINTYRE, CRAIG A.; QUOC, MYVAN; CRACKNELL, DAVID; YAMARTI, ALKA; GOTWISNER, DAVID I.
To: UCIRRUS
Reel/Frame 044706/0348 →
Continuity (2)
Provisional Application 61716174 · Oct 19, 2012
Related Publication 20150331720A1 · Nov 19, 2015