Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221493
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1 3/8] sched/completion: convert completions to use simple wait queues |
| Date | 2015-09-09 16:30 +0200 |
| Message-ID | <q6OxP-5FK-5@gated-at.bofh.it> (permalink) |
| References | <q6Mml-2BO-3@gated-at.bofh.it> <q6Mmn-2BO-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 09, 2015 at 02:05:29PM +0200, Daniel Wagner wrote:
> @@ -50,10 +50,10 @@ void complete_all(struct completion *x)
> {
> unsigned long flags;
>
> - spin_lock_irqsave(&x->wait.lock, flags);
> + raw_spin_lock_irqsave(&x->wait.lock, flags);
> x->done += UINT_MAX/2;
> - __wake_up_locked(&x->wait, TASK_NORMAL, 0);
> - spin_unlock_irqrestore(&x->wait.lock, flags);
> + swake_up_locked(&x->wait);
> + raw_spin_unlock_irqrestore(&x->wait.lock, flags);
> }
> EXPORT_SYMBOL(complete_all);
I don't think that's correct; __wake_up_locked(.nr=0) would wake all
waiters, where swake_up_locked() will only wake one.
--
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 v0 0/8] Simple wait queue support Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 8/8] orinoco_usb: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 5/8] rcu: Do not call swake_up_all with rnp->lock holding Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 6/8] gadgetfs: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 2/8] KVM: use simple waitqueue for vcpu->wq Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 3/8] sched/completion: convert completions to use simple wait queues Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
Re: [PATCH v1 3/8] sched/completion: convert completions to use simple wait queues Peter Zijlstra <peterz@infradead.org> - 2015-09-09 16:30 +0200
[PATCH v1 7/8] usb: gadget: f_fs: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 4/8] rcu: use simple wait queues where possible in rcutree Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
[PATCH v1 1/8] wait.[ch]: Introduce the simple waitqueue (swait) implementation Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
csiph-web