Lines Matching refs:head
29 * We need to ensure a later event_id doesn't publish a head when a former
33 * We only publish the head (and generate a wakeup) when the outer-most
53 unsigned long head;
68 * In order to avoid publishing a head value that goes backwards,
69 * we must ensure the load of @rb->head happens after we've
72 * Otherwise we can observe a @rb->head value before one published
76 head = local_read(&rb->head);
79 * IRQ/NMI can happen here and advance @rb->head, causing our
110 WRITE_ONCE(rb->user_page->data_head, head);
113 * We must publish the head before decrementing the nest count,
114 * otherwise an IRQ/NMI can publish a more recent head value and our
121 * Ensure we decrement @rb->nest before we validate the @rb->head.
125 if (unlikely(head != local_read(&rb->head))) {
138 ring_buffer_has_space(unsigned long head, unsigned long tail,
143 return CIRC_SPACE(head, tail, data_size) >= size;
145 return CIRC_SPACE(tail, head, data_size) >= size;
155 unsigned long tail, offset, head;
194 offset = local_read(&rb->head);
196 head = offset;
199 if (unlikely(!ring_buffer_has_space(head, tail,
218 head += size;
220 head -= size;
221 } while (!local_try_cmpxchg(&rb->head, &offset, head));
224 offset = head;
225 head = (u64)(-head);
233 if (unlikely(head - local_read(&rb->wakeup) > rb->watermark))
416 handle->head = aux_head;
491 aux_head = handle->head;
554 handle->head = rb->aux_head;