lkml.org 
[lkml]   [2015]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 3/8] sched/completion: convert completions to use simple wait queues
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.


\
 
 \ /
  Last update: 2015-09-09 16:41    [W:0.222 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site