public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Christian Bornträger" <borntraeger@de.ibm.com>
Cc: Avi Kivity <avi@redhat.com>, Julia Lawall <julia@diku.dk>,
	kvm@vger.kernel.org, Carsten Otte <cotte@de.ibm.com>,
	linux-s390@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [PATCH] kvm-390: fix wait_queue handling
Date: Mon, 20 Jul 2009 12:17:07 -0300	[thread overview]
Message-ID: <20090720151707.GE8517@amt.cnet> (raw)
In-Reply-To: <200907161717.38035.borntraeger@de.ibm.com>

On Thu, Jul 16, 2009 at 05:17:37PM +0200, Christian Bornträger wrote:
> From: Christian Borntraeger <borntraeger@de.ibm.com>
> 
> There are two waitqueues in kvm for wait handling:
> vcpu->wq for virt/kvm/kvm_main.c and
> vpcu->arch.local_int.wq for the s390 specific wait code.
> 
> the wait handling in kvm_s390_handle_wait was broken by using different
> wait_queues for add_wait queue and remove_wait_queue.
> 
> There are two options to fix the problem: 
> o  move all the s390 specific code to vcpu->wq and remove
>    vcpu->arch.local_int.wq
> o  move all the s390 specific code to vcpu->arch.local_int.wq
> 
> This patch chooses the 2nd variant for two reasons:
> o  s390 does not use kvm_vcpu_block but implements its own enabled wait
>    handling.
>    Having a separate wait_queue make it clear, that our wait mechanism is
>    different
> o  the patch is much smaller
> 
> Report-by:  Julia Lawall <julia@diku.dk>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/interrupt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: kvm/arch/s390/kvm/interrupt.c
> ===================================================================
> --- kvm.orig/arch/s390/kvm/interrupt.c
> +++ kvm/arch/s390/kvm/interrupt.c
> @@ -386,7 +386,7 @@ no_timer:
>  	}
>  	__unset_cpu_idle(vcpu);
>  	__set_current_state(TASK_RUNNING);
> -	remove_wait_queue(&vcpu->wq, &wait);
> +	remove_wait_queue(&vcpu->arch.local_int.wq, &wait);
>  	spin_unlock_bh(&vcpu->arch.local_int.lock);
>  	spin_unlock(&vcpu->arch.local_int.float_int->lock);
>  	hrtimer_try_to_cancel(&vcpu->arch.ckc_timer);

Applied, thanks.

      reply	other threads:[~2009-07-20 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0907101344350.9598@ask.diku.dk>
2009-07-12  8:22 ` question about arch/s390/kvm/interrupt.c Avi Kivity
2009-07-13  7:55   ` Carsten Otte
2009-07-16 15:17   ` [PATCH] kvm-390: fix wait_queue handling Christian Bornträger
2009-07-20 15:17     ` Marcelo Tosatti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090720151707.GE8517@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=julia@diku.dk \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox