Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1199192
| From | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL |
| Date | 2015-08-03 21:10 +0200 |
| Message-ID | <pTthw-3DC-9@gated-at.bofh.it> (permalink) |
| References | <pSuIF-7XV-3@gated-at.bofh.it> <pSuIF-7XV-9@gated-at.bofh.it> <pSNrY-1nq-7@gated-at.bofh.it> <pTsEN-2EE-1@gated-at.bofh.it> <pTsOu-2PZ-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2015-08-03 at 20:37 +0200, Peter Zijlstra wrote:
> OK, so there's no 'fix'? The patch claims we can loose a wakeup and I
> just don't see how that is true.
Taking another look, I think you could hit something like this:
CPU0 (lock): CPU1 (unlock):
pv_wait_head __pv_queued_spin_unlock
<load ->state> [bogus ->state != halted]
<spin> smp_store_release(&l->locked, 0);
WRITE_ONCE(pn->state, vcpu_halted);
pv_wait(&l->locked, _Q_SLOW_VAL); if (->state == vcpu_halted)
pv_kick(node->cpu); <-- missing wakeup, never called
So basically you can miss a wakeup if node->state load is done while the
locking thread is spinning and hasn't gotten a chance to update the
state to halted. That would also imply that it occurs right when the
threshold limit is about to be reached.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Waiman Long <Waiman.Long@hp.com> - 2015-08-01 04:30 +0200
RE: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL "Long, Wai Man" <waiman.long@hp.com> - 2015-08-01 22:20 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Peter Zijlstra <peterz@infradead.org> - 2015-08-02 00:30 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Davidlohr Bueso <dave@stgolabs.net> - 2015-08-03 20:30 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Peter Zijlstra <peterz@infradead.org> - 2015-08-03 20:40 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Davidlohr Bueso <dave@stgolabs.net> - 2015-08-03 21:10 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Peter Zijlstra <peterz@infradead.org> - 2015-08-03 22:00 +0200
Re: [PATCH v4 1/7] locking/pvqspinlock: Unconditional PV kick with _Q_SLOW_VAL Waiman Long <waiman.long@hp.com> - 2015-08-04 05:30 +0200
csiph-web