Mechanism for a lockless ring buffer in overwrite mode
Abstract
In one embodiment, a mechanism for a lockless ring buffer in overwrite mode is disclosed. In one embodiment, a method for implementing a lockless ring buffer in overwrite mode includes aligning memory addresses for each page of a ring buffer to form maskable bits in the address to be used as a state flag for the page and utilizing at least a two least significant bits of each of the addresses to represent the state flag associated with the page represented by the address, wherein the state flag indicates one of three states including a header state, an update state, and a normal state. The method further includes combining a movement of a head page pointer to a head page of the ring buffer with a swapping of the head page and a reader page, the combining comprising updating the state flag of the head page pointer to the normal state and updating the state flag of a pointer to the page after the head page to the header state, and moving the head page and a tail page of the ring buffer, the moving comprising updating the state flags of one or more pointers in the ring buffer associated with the head page and the tail page.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 8.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method, comprising: aligning memory addresses for each page of a ring buffer to form maskable bits in the address to be used as a state flag for the page, the ring buffer stored in a physical memory device; utilizing at least two least significant bits of each of the addresses to represent the state flag associated with the page represented by the address, wherein the state flag indicates one of three states including a header state, an update state, and a normal state; combining, by a processing device coupled to the physical memory device, a movement of a head page poi
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (8 of 8 total)
References Cited — Backward Prior Art (6)
Non-Patent Literature (1)
- Rostedt, S., The World of Ftrace, http://people.redhat.com/srostedt/ftrace-world.odp, Apr. 9, 2009, 33 pgs.