search for: ___pv_kick_head

Displaying 6 results from an estimated 6 matches for "___pv_kick_head".

2014 Jun 16
4
[PATCH 10/11] qspinlock: Paravirt support
...new = val | _Q_LOCKED_SLOW; > + old = atomic_cmpxchg(&lock->val, val, new); > + if (old == val) > + break; > + val = old; > + } > + > + /* XXX 16bit would be better */ > + pv_wait(&lock->val.counter, new); > + } > +} > + > +static void ___pv_kick_head(struct qspinlock *lock) > +{ > + struct pv_node *pn; > + > + pn = pv_decode_tail(atomic_read(&lock->val)); > + > + while (pn->head == INVALID_HEAD) > + cpu_relax(); > + > + if (WARN_ON_ONCE(pn->head == NO_HEAD)) > + return; > + > + pv_kick(pn->h...
2014 Jun 16
4
[PATCH 10/11] qspinlock: Paravirt support
...new = val | _Q_LOCKED_SLOW; > + old = atomic_cmpxchg(&lock->val, val, new); > + if (old == val) > + break; > + val = old; > + } > + > + /* XXX 16bit would be better */ > + pv_wait(&lock->val.counter, new); > + } > +} > + > +static void ___pv_kick_head(struct qspinlock *lock) > +{ > + struct pv_node *pn; > + > + pn = pv_decode_tail(atomic_read(&lock->val)); > + > + while (pn->head == INVALID_HEAD) > + cpu_relax(); > + > + if (WARN_ON_ONCE(pn->head == NO_HEAD)) > + return; > + > + pv_kick(pn->h...
2014 Jun 15
0
[PATCH 10/11] qspinlock: Paravirt support
...+ if (!(val & _Q_LOCKED_PENDING_MASK)) + return; + new = val | _Q_LOCKED_SLOW; + old = atomic_cmpxchg(&lock->val, val, new); + if (old == val) + break; + val = old; + } + + /* XXX 16bit would be better */ + pv_wait(&lock->val.counter, new); + } +} + +static void ___pv_kick_head(struct qspinlock *lock) +{ + struct pv_node *pn; + + pn = pv_decode_tail(atomic_read(&lock->val)); + + while (pn->head == INVALID_HEAD) + cpu_relax(); + + if (WARN_ON_ONCE(pn->head == NO_HEAD)) + return; + + pv_kick(pn->head); +} + +void __pv_queue_unlock(struct qspinlock *lock) +...
2014 Jun 18
0
[PATCH 10/11] qspinlock: Paravirt support
Il 17/06/2014 00:08, Waiman Long ha scritto: >> +void __pv_queue_unlock(struct qspinlock *lock) >> +{ >> + int val = atomic_read(&lock->val); >> + >> + native_queue_unlock(lock); >> + >> + if (val & _Q_LOCKED_SLOW) >> + ___pv_kick_head(lock); >> +} >> + > > Again a race can happen here between the reading and writing of the lock > value. I can't think of a good way to do that without using cmpxchg. Could you just use xchg on the locked byte? Paolo
2014 Jun 15
28
[PATCH 00/11] qspinlock with paravirt support
Since Waiman seems incapable of doing simple things; here's my take on the paravirt crap. The first few patches are taken from Waiman's latest series, but the virt support is completely new. Its primary aim is to not mess up the native code. I've not stress tested it, but the virt and paravirt (kvm) cases boot on simple smp guests. I've not done Xen, but the patch should be
2014 Jun 15
28
[PATCH 00/11] qspinlock with paravirt support
Since Waiman seems incapable of doing simple things; here's my take on the paravirt crap. The first few patches are taken from Waiman's latest series, but the virt support is completely new. Its primary aim is to not mess up the native code. I've not stress tested it, but the virt and paravirt (kvm) cases boot on simple smp guests. I've not done Xen, but the patch should be