search for: batch_mask

Displaying 3 results from an estimated 3 matches for "batch_mask".

2014 May 29
0
[RFC] Implement Batched (group) ticket lock
...ikely(inc.head == inc.tail)) > - goto out; > > inc.tail&= ~TICKET_SLOWPATH_FLAG; > for (;;) { > unsigned count = SPIN_THRESHOLD; > > do { > - if (ACCESS_ONCE(lock->tickets.head) == inc.tail) > - goto out; > + if ((inc.head& TICKET_LOCK_BATCH_MASK) == (inc.tail& > + TICKET_LOCK_BATCH_MASK)) > + goto spin; > cpu_relax(); > + inc.head = ACCESS_ONCE(lock->tickets.head); > } while (--count); > __ticket_lock_spinning(lock, inc.tail); > } > +spin: > + for (;;) { > + inc.head = ACCESS...
2014 May 28
7
[RFC] Implement Batched (group) ticket lock
...inc = xadd(&lock->tickets, inc); - if (likely(inc.head == inc.tail)) - goto out; inc.tail &= ~TICKET_SLOWPATH_FLAG; for (;;) { unsigned count = SPIN_THRESHOLD; do { - if (ACCESS_ONCE(lock->tickets.head) == inc.tail) - goto out; + if ((inc.head & TICKET_LOCK_BATCH_MASK) == (inc.tail & + TICKET_LOCK_BATCH_MASK)) + goto spin; cpu_relax(); + inc.head = ACCESS_ONCE(lock->tickets.head); } while (--count); __ticket_lock_spinning(lock, inc.tail); } +spin: + for (;;) { + inc.head = ACCESS_ONCE(lock->tickets.head); + if (!(inc.head &...
2014 May 28
7
[RFC] Implement Batched (group) ticket lock
...inc = xadd(&lock->tickets, inc); - if (likely(inc.head == inc.tail)) - goto out; inc.tail &= ~TICKET_SLOWPATH_FLAG; for (;;) { unsigned count = SPIN_THRESHOLD; do { - if (ACCESS_ONCE(lock->tickets.head) == inc.tail) - goto out; + if ((inc.head & TICKET_LOCK_BATCH_MASK) == (inc.tail & + TICKET_LOCK_BATCH_MASK)) + goto spin; cpu_relax(); + inc.head = ACCESS_ONCE(lock->tickets.head); } while (--count); __ticket_lock_spinning(lock, inc.tail); } +spin: + for (;;) { + inc.head = ACCESS_ONCE(lock->tickets.head); + if (!(inc.head &...