Lines Matching +full:- +full:single +full:- +full:end
1 /* SPDX-License-Identifier: GPL-2.0-only */
13 * A funnel queue is a simple (almost) lock-free queue that accepts entries from multiple threads
14 * (multi-producer) and delivers them to a single thread (single-consumer). "Funnel" is an attempt
15 * to evoke the image of requests from more than one producer being "funneled down" to a single
18 * This is an unsynchronized but thread-safe data structure when used as intended. There is no
32 * many lock-free data structures. The queue is dynamically allocated to ensure cache-line
35 * The algorithm is not actually 100% lock-free. There is a single point in vdo_funnel_queue_put()
38 * reach what was the end of the queue at the time of the preemption.
58 * The producers' end of the queue, an atomically exchanged pointer that will never be in __aligned()
63 /* The consumer's end of the queue, which is owned by the consumer and never NULL. */ in __aligned()
66 /* A dummy entry used to provide the non-NULL invariants above. */ in __aligned()
75 * Put an entry on the end of the queue.
89 * structure fields) must happen before the previous->next store making it visible to the in vdo_funnel_queue_put()
95 WRITE_ONCE(entry->next, NULL); in vdo_funnel_queue_put()
96 previous = xchg(&queue->newest, entry); in vdo_funnel_queue_put()
101 WRITE_ONCE(previous->next, entry); in vdo_funnel_queue_put()