public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Peter Maydell <peter.maydell@linaro.org>,
	kvm-devel <kvm@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Andreas Tobler <andreast@freebsd.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()
Date: Wed, 13 Nov 2013 09:26:52 +0200	[thread overview]
Message-ID: <20131113072652.GA7132@redhat.com> (raw)
In-Reply-To: <5282E37E.6090704@twiddle.net>

On Wed, Nov 13, 2013 at 12:27:10PM +1000, Richard Henderson wrote:
> On 11/13/2013 08:53 AM, Paolo Bonzini wrote:
> > Il 12/11/2013 19:54, Richard Henderson ha scritto:
> >> For what it's worth, I think BOTH of the patches that have been posted
> >> should be applied.  That is, the patch that does (X || 1) -> (1 || X),
> >> and the patch that adds the stub.
> >>
> >> Frankly I'd have thought this was obvious
> > 
> > It's not that obvious to me.
> > 
> > If you add the stub, the patch that reorders operands is not necessary.
> >  If you reorder operands, the stub is not necessary.
> > 
> > The patch that does (X || 1) -> (1 || X) is unnecessary as a
> > microoptimization, since this code basically runs once at startup.  The
> > code is also a little bit less clear with the reordered operands, but
> > perhaps that's just me because I wrote the code that way.  (Splitting
> > the if in two would also make sense, and would not affect clarity).
> > 
> > Why should both be applied?
> 
> It's worth working around the clang missed optimization, if for nothing else
> than avoiding the noise of the bugs that would otherwise be filed against the
> release.
> 
> I think it's also worthwhile to implement the kvm api in kvm-stub.c,
> unnecessary or not.  If you really want compile-time feedback on those that
> ought to have been removed by optimization, you could elide them from the stub
> file depending on ifndef __OPTIMIZE__.
> 
Sounds like a nice compromise.

--
			Gleb.

  parent reply	other threads:[~2013-11-13  7:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 21:22 [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() Peter Maydell
2013-11-11 21:28 ` Andreas Tobler
2013-11-11 22:19 ` Paolo Bonzini
2013-11-11 22:38   ` Peter Maydell
2013-11-11 23:11     ` Paolo Bonzini
2013-11-11 23:21       ` Anthony Liguori
2013-11-12  7:09         ` Paolo Bonzini
2013-11-12 11:07         ` Peter Maydell
2013-11-12 12:09           ` Paolo Bonzini
2013-11-12 12:16             ` Peter Maydell
2013-11-12 13:12               ` Paolo Bonzini
2013-11-12 13:21                 ` Peter Maydell
2013-11-12 13:26                   ` Gleb Natapov
2013-11-12 13:23                 ` Gleb Natapov
2013-11-12 13:57                   ` Paolo Bonzini
2013-11-12 14:09                     ` Gleb Natapov
2013-11-12 14:14                       ` Peter Maydell
2013-11-12 14:57                       ` Paolo Bonzini
2013-11-12 15:13                         ` Peter Maydell
2013-11-12 15:21                           ` Paolo Bonzini
2013-11-12 15:32                             ` Peter Maydell
2013-11-12 15:58                               ` Paolo Bonzini
2013-11-12 16:08                                 ` Peter Maydell
2013-11-12 17:04                                   ` Anthony Liguori
2013-11-12 17:20                                     ` Peter Maydell
2013-11-12 18:54                                     ` [Qemu-devel] " Richard Henderson
2013-11-12 18:57                                       ` Peter Maydell
2013-11-12 19:15                                         ` Stefan Weil
2013-11-12 22:53                                       ` [Qemu-devel] " Paolo Bonzini
2013-11-13  2:27                                         ` Richard Henderson
2013-11-13  7:25                                           ` Paolo Bonzini
2013-11-13 22:23                                             ` Peter Maydell
2013-11-13  7:26                                           ` Gleb Natapov [this message]
2013-11-12 14:01                 ` Peter Maydell
2013-11-11 23:23       ` Peter Maydell

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=20131113072652.GA7132@redhat.com \
    --to=gleb@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=andreast@freebsd.org \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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