Lines Matching defs:node

156  * This provides a release barrier for publishing node, this pairs with the
356 static __always_inline void propagate_yield_cpu(struct qnode *node, u32 val, int *set_yield_cpu, bool paravirt)
370 next = READ_ONCE(node->next);
384 static __always_inline bool yield_to_prev(struct qspinlock *lock, struct qnode *node, u32 val, bool paravirt)
397 yield_cpu = READ_ONCE(node->yield_cpu);
400 if (node->next && node->next->yield_cpu != -1)
401 node->next->yield_cpu = yield_cpu;
419 if (yield_cpu == node->yield_cpu) {
420 if (node->next && node->next->yield_cpu != yield_cpu)
421 node->next->yield_cpu = yield_cpu;
443 if (!READ_ONCE(node->locked)) {
543 struct qnode *next, *node;
564 * Ensure that we increment the head node->count before initialising
565 * the actual node. If the compiler is kind enough to reorder these
569 node = &qnodesp->nodes[idx];
570 node->next = NULL;
571 node->lock = lock;
572 node->cpu = smp_processor_id();
573 node->yield_cpu = -1;
574 node->locked = 0;
576 tail = encode_tail_cpu(node->cpu);
579 * Assign all attributes of a node before it can be published.
586 * If there was a previous node; link it and wait until reaching the
592 /* Link @node into the waitqueue. */
593 WRITE_ONCE(prev->next, node);
595 /* Wait for mcs node lock to be released */
597 while (!READ_ONCE(node->locked)) {
600 if (yield_to_prev(lock, node, old, paravirt))
607 if (paravirt && pv_yield_propagate_owner && node->yield_cpu != -1)
608 node->yield_cpu = -1;
618 next = READ_ONCE(node->next);
651 propagate_yield_cpu(node, val, &set_yield_cpu, paravirt);
687 /* There is a next, must wait for node->next != NULL (MCS protocol) */
688 next = READ_ONCE(node->next);
691 while (!(next = READ_ONCE(node->next)))
698 * Unlock the next mcs waiter node. Release barrier is not required
718 qnodesp->count--; /* release the node */