lkml.org 
[lkml]   [2015]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -rt 1/2] KVM: use simple waitqueue for vcpu->wq
On Fri, 16 Jan 2015 11:48:46 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> > static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)
> > {
> > - DEFINE_WAIT(wait);
> > + DEFINE_SWAITER(wait);
> >
> > - prepare_to_wait(&vc->wq, &wait, TASK_INTERRUPTIBLE);
> > + swait_prepare(&vc->wq, &wait, TASK_INTERRUPTIBLE);
> > vc->vcore_state = VCORE_SLEEPING;
> > spin_unlock(&vc->lock);
> > schedule();
> > - finish_wait(&vc->wq, &wait);
> > + swait_finish(&vc->wq, &wait);
> > spin_lock(&vc->lock);
> > vc->vcore_state = VCORE_INACTIVE;
> > }
> > @@ -1613,7 +1613,7 @@
> > kvmppc_create_dtl_entry(vcpu, vc);
> > kvmppc_start_thread(vcpu);
> > } else if (vc->vcore_state == VCORE_SLEEPING) {
> > - wake_up(&vc->wq);
> > + swait_wake(&vc->wq);
>
> I notice everywhere you have a swait_wake_interruptible() but here. Is
> there a reason why?
>

Of course I could have misread this patch, and this specific work queue
will only be woken up by swait_wake() and not
swait_wake_interruptible(). If that's the case, then its fine as is
(except for that typo I pointed out before).

-- Steve


\
 
 \ /
  Last update: 2015-01-16 18:21    [W:0.107 / U:3.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site