System and method for reading and writing data with a shared memory hash table
First Claim
1. A non-transitory machine-readable medium having executable instructions to cause one or more processing units to perform a method to read data for a local buffer of a reader of a network element, the method comprising:
- locating a bucket for the data in a shared memory hash table, wherein a writer updates the data in-place in the bucket in the shared memory hash table and the reader is one of a plurality of readers that reads from the shared memory hash table;
retrieving an initial value of a version of the bucket;
if the initial value of the version indicates that the data is being modified,copying the data from a lookaside buffer to the local buffer for the shared memory hash table, wherein the lookaside buffer stores a copy of the data of the bucket while the bucket is being modified and is accessible by the plurality of readers.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus of a device that reads and writes data using a shared memory hash table and a lookaside buffer is described. In an exemplary embodiment, a device locates a bucket for the data in a shared memory hash table, where a writer updates the shared memory hash table and a reader that is one of a plurality of readers reads from the shared memory hash table. The device further retrieves an initial value of a version of the bucket. If the initial value of the version is odd, the device copies the data from a lookaside buffer of the writer to a local buffer for the reader, wherein the lookaside buffer stores a copy of the data while the bucket is being modified.
-
Citations
21 Claims
-
1. A non-transitory machine-readable medium having executable instructions to cause one or more processing units to perform a method to read data for a local buffer of a reader of a network element, the method comprising:
-
locating a bucket for the data in a shared memory hash table, wherein a writer updates the data in-place in the bucket in the shared memory hash table and the reader is one of a plurality of readers that reads from the shared memory hash table; retrieving an initial value of a version of the bucket; if the initial value of the version indicates that the data is being modified, copying the data from a lookaside buffer to the local buffer for the shared memory hash table, wherein the lookaside buffer stores a copy of the data of the bucket while the bucket is being modified and is accessible by the plurality of readers. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory machine-readable medium having executable instructions to cause one or more processing units to perform a method to write data by a writer of a network element, the method comprising:
-
locating a bucket that stores bucket data in a shared memory hash table, wherein the writer modifies the shared memory hash table and a plurality of readers that read from the shared memory hash table, and the bucket is an element of a bucket chain; copying the bucket data to a lookaside buffer, wherein the bucket data stored in the lookaside buffer can be read by the plurality of readers while the bucket data in the bucket is being modified; incrementing a version of the bucket in the bucket chain, wherein the incremented version indicates that the bucket is being modified; modifying the bucket data in place; and subsequently incrementing the incremented version of the bucket to indicate the bucket data is not being modified. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A method to read data for a local buffer of a reader of a network element, the method comprising:
-
locating a bucket for the data in a shared memory hash table, wherein a writer updates the data in-place in the bucket in the shared memory hash table and the reader is one of a plurality of readers that reads from the shared memory hash table; retrieving an initial value of a version of the bucket; if the initial value of the version indicates that the data is not being modified, copying the data from a lookaside buffer to the local buffer for the shared memory hash table, wherein the lookaside buffer stores a copy of the data of the bucket while the bucket is being modified and is accessible by the plurality of readers. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A network element to read data for a local buffer of a reader of the network element, the network element comprising:
-
a processor; a memory coupled to the processor through a bus; and a process executed from the memory by the processor to cause the processor to locate a bucket for the data in a shared memory hash table, wherein a writer updates the data in-place in the bucket in the shared memory hash table and the reader is one of a plurality of readers that reads from the shared memory hash table, retrieve an initial value of a version of the bucket, and, if the initial value of the version indicates that the data is being modified, copy the data from a lookaside buffer to the local buffer for the shared memory hash table, wherein the lookaside buffer stores a copy of the data of the bucket while the bucket is being modified and is accessible by the plurality of readers. - View Dependent Claims (20)
-
-
21. A method to write data by a writer of a network element, the method comprising:
-
locating a bucket that stores bucket data in a shared memory hash table, wherein the writer modifies the shared memory hash table and a plurality of readers that read from the shared memory hash table, and the bucket is an element of a bucket chain; copying the bucket data to a lookaside buffer, wherein the bucket data stored in the lookaside buffer can be read by the plurality of readers while the bucket data in the bucket is being modified; incrementing a version of the bucket in the bucket chain, wherein the incremented version indicates that the bucket is being modified; modifying the bucket data in place; and subsequently incrementing the incremented version of the bucket to indicate the bucket data is not being modified.
-
Specification