All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: hpa@linux.intel.com, Steven Rostedt <rostedt@goodmis.org>,
	david.vrabel@citrix.com, linux-kernel@vger.kernel.org,
	Stefano.Stabellini@eu.citrix.com
Subject: Re: [PATCH] xen: Do not enable spinlocks before jump_label_init() has executed
Date: Tue, 24 Sep 2013 16:11:33 -0400	[thread overview]
Message-ID: <20130924201133.GB14935@phenom.dumpdata.com> (raw)
In-Reply-To: <5241ED15.7090003@oracle.com>

On Tue, Sep 24, 2013 at 12:50:45PM -0700, Boris Ostrovsky wrote:
> On 09/12/2013 10:47 PM, Steven Rostedt wrote:
> >On Thu, 12 Sep 2013 22:29:44 -0400
> >Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:
> >
> >>From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >>
> >>xen_init_spinlocks() currently calls static_key_slow_inc() before
> >>jump_label_init() is invoked. When CONFIG_JUMP_LABEL is set (which usually is
> >>the case) the effect of this static_key_slow_inc() is deferred until after
> >>jump_label_init(). This is different from when CONFIG_JUMP_LABEL is not set, in
> >>which case the key is set immediately. Thus, depending on the value of config
> >>option, we may observe different behavior.
> >>
> >>In addition, when we come to __jump_label_transform() from jump_label_init(),
> >>the key (paravirt_ticketlocks_enabled) is already enabled. On processors where
> >>ideal_nop is not the same as default_nop this will cause a BUG() since it is
> >>expected that before a key is enabled the latter is replaced by the former
> >>during initialization.
> >>
> >>To address this problem we need to move
> >>static_key_slow_inc(&paravirt_ticketlocks_enabled) so that it is called
> >>after jump_label_init(). We also need to make sure that this is done before
> >>other cpus start to boot. early_initcall appears to be  a good place to do so.
> >>(Note that we cannot move whole xen_init_spinlocks() there since pv_lock_ops
> >>need to be set before alternative_instructions() runs.)
> >>
> >Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
> >
> >Peter,
> >
> >This fixes a regression in 3.12 against xen. Please pull and push to
> >Linus sometime soon.
> 
> Peter,
> 
> Are you planning on taking this patch?

If he hasn't done yet (and I don't see a tip-bot email so I think the answer
is no) I can do it (as I am back from my mini vacation).

Thanks for the ping!

      reply	other threads:[~2013-09-24 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13  2:29 [PATCH] xen: Do not enable spinlocks before jump_label_init() has executed Boris Ostrovsky
2013-09-13  2:47 ` Steven Rostedt
2013-09-24 19:50   ` Boris Ostrovsky
2013-09-24 20:11     ` Konrad Rzeszutek Wilk [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=20130924201133.GB14935@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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.