All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jan Beulich <JBeulich@novell.com>,
	"mingo@elte.hu" <mingo@elte.hu>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Ky Srinivasan <KSrinivasan@novell.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4, v2] x86: enlightenment for ticket spin locks -	 Xen implementation
Date: Wed, 30 Jun 2010 15:14:03 -0700	[thread overview]
Message-ID: <4C2BC1AB.9050500@zytor.com> (raw)
In-Reply-To: <4C2B4564.7030203@goop.org>

On 06/30/2010 06:23 AM, Jeremy Fitzhardinge wrote:
> 
> pvops is a superset of alternative instruction patching, and are really
> designed to serve different purposes.  There are some areas in which
> there's some overlap, but otherwise they are distinct.  In particular,
> alternative instructions are really only useful if you can express the
> patch in terms of the presence or absence of a particular cpu feature. 
> It can't do multi-way choice, and it can't do anything other than insert
> literal instructions.  pvops patching can do multi-way, and has a
> higher-level view of each patch site which allows it to do things like
> generate appropraite save/restores, make inline vs call decisions, nop
> out nop callsites, etc.
> 

A lot of this -- in particular the multiway -- is a defect in the
alternatives implementation and should have been addressed as such.  One
of the biggest problems with pvops as it currently stands is that it is
monolithic; in general we have this class of problems (static selection)
in a *lot* more places than we're dealing with right now, and as such,
generalizing *something* -- be it pvops or alternatives -- would be useful.

gcc 4.5 also includes a very powerful facility called "asm goto", which
I have already used to implement static_cpu_has().  Again, that
particular construct (unlike "asm goto" itself) doesn't support multiway.

	-hpa


  parent reply	other threads:[~2010-06-30 22:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 14:32 [PATCH 2/4, v2] x86: enlightenment for ticket spin locks - Xen implementation Jan Beulich
2010-06-30  8:05 ` Peter Zijlstra
2010-06-30  8:52   ` Jan Beulich
2010-06-30  8:56     ` Peter Zijlstra
2010-06-30  9:04       ` Jan Beulich
2010-06-30 10:07 ` Jeremy Fitzhardinge
2010-06-30 11:31   ` Jan Beulich
2010-06-30 13:23     ` Jeremy Fitzhardinge
2010-06-30 14:03       ` Jan Beulich
2010-06-30 14:25         ` Jeremy Fitzhardinge
2010-06-30 14:36           ` Jan Beulich
2010-06-30 14:42             ` Jeremy Fitzhardinge
2010-06-30 22:14       ` H. Peter Anvin [this message]
2010-07-05 23:12         ` Jeremy Fitzhardinge
2010-06-30 15:57   ` Stefano Stabellini
2010-07-01  7:57     ` Jan Beulich
2010-07-01 11:39       ` Stefano Stabellini

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=4C2BC1AB.9050500@zytor.com \
    --to=hpa@zytor.com \
    --cc=JBeulich@novell.com \
    --cc=KSrinivasan@novell.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tglx@linutronix.de \
    /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.