qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Cc: Michal Privoznik <mprivozn@redhat.com>,
	Jitendra Kolhe <jitendra.kolhe@hpe.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] os: don't corrupt pre-existing memory-backend data with prealloc
Date: Fri, 24 Feb 2017 13:18:22 +0100	[thread overview]
Message-ID: <64d3da43-9ff6-e448-fb40-13fbe367e27a@redhat.com> (raw)
In-Reply-To: <20170224121217.GH2435@work-vm>



On 24/02/2017 13:12, Dr. David Alan Gilbert wrote:
>> Ok, yeah, it makes sense that the compiler can optimize that away without
>> volatile. I wonder if adding volatile has much of a performance impact on
>> this loop...
> I don't think we have anything else in QEMU to do it (other than atomic's
> but we don't need this to be atomic).   I don't think the use of memset()
> helps, because the compiler is free to optimise that out as well; so
> I think 'volatile' is a reasonable use (although I seem to have a soft-spot
> for volatile and I know everyone else tells me I'm mad).

Yes, I think it is fine to use volatile here.

Paolo

  reply	other threads:[~2017-02-24 12:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 10:59 [Qemu-devel] [PATCH] os: don't corrupt pre-existing memory-backend data with prealloc Daniel P. Berrange
2017-02-23 12:05 ` Michal Privoznik
2017-02-23 12:07   ` Daniel P. Berrange
2017-02-24  9:05     ` Michal Privoznik
2017-02-24  9:24       ` Daniel P. Berrange
2017-02-24 12:12         ` Dr. David Alan Gilbert
2017-02-24 12:18           ` Paolo Bonzini [this message]
2017-02-27 11:10 ` Stefan Hajnoczi
2017-02-27 13:46   ` Rik van Riel
2017-02-27 13:58     ` Daniel P. Berrange
  -- strict thread matches above, loose matches on Subject: below --
2017-02-24 17:27 Daniel P. Berrange
2017-02-24 17:33 ` no-reply
2017-02-27  9:25   ` Daniel P. Berrange
2017-02-24 19:04 ` Eric Blake
2017-02-27 13:28 ` Stefan Hajnoczi
2017-02-27 15:53 ` Andrea Arcangeli

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=64d3da43-9ff6-e448-fb40-13fbe367e27a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jitendra.kolhe@hpe.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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;
as well as URLs for NNTP newsgroup(s).