All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <xen-devel@lists.xenproject.org>,
	<boris.ostrovsky@oracle.com>, <stefan.bader@canonical.com>,
	<stefano.stabellini@eu.citrix.com>, <jeremy@goop.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon under PVHVM.
Date: Mon, 9 Sep 2013 11:31:23 +0100	[thread overview]
Message-ID: <522DA37B.1070309@citrix.com> (raw)
In-Reply-To: <1378561605-18998-2-git-send-email-konrad.wilk@oracle.com>

On 07/09/13 14:46, Konrad Rzeszutek Wilk wrote:
> The xen_lock_spinning has a check for the kicker interrupts
> and if it is not initialised it will spin normally (not enter
> the slowpath).
> 
> But for PVHVM case we would initialise the kicker interrupt
> before the CPU came online. This meant that if the booting
> CPU used a spinlock and went in the slowpath - it would
> enter the slowpath and block forever. The forever part b/c

b/c? Ewww.  Proper English please.

> during bootup the interrupts are disabled - so the CPU would
> never get an IPI kick and would stay stuck in the slowpath
> logic forever.

This description isn't right -- VCPUs blocked in SCHEDOP_poll can be
unblocked on the event they're waiting for even if local irq delivery is
disabled.

> Why would the booting CPU never get an IPI kick? B/c in both
> PV and PVHVM we consult the cpu_online_mask to determine whether
> the IPI should go to its CPU destination. Since the booting
> CPU has not yet finished and set that flag, it meant that
> if any spinlocks were taken before the booting CPU had gotten to:

I can't find where the online mask is being checked in
xen_send_IPI_one().  Is this really the reason why it didn't work?

This fix looks fine but both the description and the comment need to be
fixed/clarified.

David

  parent reply	other threads:[~2013-09-09 10:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-07 13:46 [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v1) Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon under PVHVM Konrad Rzeszutek Wilk
2013-09-07 13:46 ` Konrad Rzeszutek Wilk
2013-09-09 10:31   ` David Vrabel
2013-09-09 10:31   ` David Vrabel [this message]
2013-09-09 13:06     ` Konrad Rzeszutek Wilk
2013-09-09 13:06     ` Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 2/5] xen/spinlock: We don't need the old structure anymore Konrad Rzeszutek Wilk
2013-09-07 13:46 ` Konrad Rzeszutek Wilk
2013-09-09 10:18   ` David Vrabel
2013-09-09 10:18   ` David Vrabel
2013-09-09 10:36   ` Ramkumar Ramachandra
2013-09-09 10:36   ` Ramkumar Ramachandra
2013-09-07 13:46 ` [PATCH 3/5] xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM Konrad Rzeszutek Wilk
2013-09-07 13:46 ` Konrad Rzeszutek Wilk
2013-09-09 10:31   ` David Vrabel
2013-09-09 13:11     ` Konrad Rzeszutek Wilk
2013-09-09 13:11     ` Konrad Rzeszutek Wilk
2013-09-09 10:31   ` David Vrabel
2013-09-07 13:46 ` [PATCH 4/5] xen/spinlock: Don't setup xen spinlock IPI kicker if disabled Konrad Rzeszutek Wilk
2013-09-09 10:34   ` David Vrabel
2013-09-09 10:34   ` David Vrabel
2013-09-09 11:07   ` Ramkumar Ramachandra
2013-09-09 11:07   ` Ramkumar Ramachandra
2013-09-07 13:46 ` Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 5/5] Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM" Konrad Rzeszutek Wilk
2013-09-07 13:46 ` Konrad Rzeszutek Wilk
2013-09-09 10:34 ` [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v1) David Vrabel
2013-09-09 10:34 ` David Vrabel
2013-09-09 13:12   ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-09-09 13:12   ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2013-09-09 15:11 [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v2) Konrad Rzeszutek Wilk
2013-09-09 15:11 ` [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon under PVHVM Konrad Rzeszutek Wilk
2013-09-09 15:11 ` Konrad Rzeszutek Wilk

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=522DA37B.1070309@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.bader@canonical.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.