From: "H. Peter Anvin" <hpa@zytor.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
x86@kernel.org, kvm@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>, Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC dontapply 5/5] kvm_para: guest side for eoi avoidance
Date: Tue, 08 May 2012 08:45:39 -0700 [thread overview]
Message-ID: <4FA93FA3.20306@zytor.com> (raw)
In-Reply-To: <20120508152843.GE8988@redhat.com>
On 05/08/2012 08:28 AM, Gleb Natapov wrote:
> On Tue, May 08, 2012 at 05:26:55PM +0200, Paolo Bonzini wrote:
>> Il 23/04/2012 16:04, Michael S. Tsirkin ha scritto:
>>> +/* Our own copy of __test_and_clear_bit to make sure
>>> + * it is done with a single instruction */
>>
>> Is this for microoptimization or correctness? If the latter, it does
>> not ensure anything without a "lock" prefix.
>>
> It can't race with other vcpus, only with vmexit on the same vcpu.
>
That doesn't answer the question very well... I really don't understand
the point of having a private copy here.
I really, really don't want a bunch of private interfaces around. It
would be a lot better to define a test_and_{set,clear}_bit_local() in
<asm/bitops.h> which is defined to be local CPU atomic.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2012-05-08 15:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 14:03 [PATCH RFC 0/5] apic: eoi optimization support Michael S. Tsirkin
2012-04-23 14:04 ` [PATCH RFC 1/5] apic: fix typo EIO_ACK -> EOI_ACK and document Michael S. Tsirkin
2012-04-23 14:04 ` [PATCH RFC 2/5] apic: use symbolic APIC_EOI_ACK Michael S. Tsirkin
2012-04-23 14:04 ` [PATCH RFC 3/5] x86: add apic->eoi_write callback Michael S. Tsirkin
2012-04-23 14:04 ` [PATCH RFC 4/5] x86: eoi micro-optimization Michael S. Tsirkin
2012-04-23 14:04 ` [PATCH RFC dontapply 5/5] kvm_para: guest side for eoi avoidance Michael S. Tsirkin
2012-04-24 6:50 ` Gleb Natapov
2012-04-24 6:58 ` Michael S. Tsirkin
2012-04-24 7:07 ` Gleb Natapov
2012-05-08 15:26 ` Paolo Bonzini
2012-05-08 15:28 ` Gleb Natapov
2012-05-08 15:45 ` H. Peter Anvin [this message]
2012-05-08 16:32 ` Gleb Natapov
2012-05-08 16:57 ` Michael S. Tsirkin
2012-05-08 18:06 ` H. Peter Anvin
2012-05-08 19:36 ` Michael S. Tsirkin
2012-05-07 10:35 ` [PATCH RFC 0/5] apic: eoi optimization support Ingo Molnar
2012-05-07 10:59 ` Michael S. Tsirkin
2012-05-07 11:40 ` Ingo Molnar
2012-05-07 11:47 ` Avi Kivity
2012-05-07 11:57 ` Ingo Molnar
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=4FA93FA3.20306@zytor.com \
--to=hpa@zytor.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.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 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).