[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120508165736.GA26795@redhat.com>
Date: Tue, 8 May 2012 19:57:36 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Gleb Natapov <gleb@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>, x86@...nel.org,
kvm@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Avi Kivity <avi@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC dontapply 5/5] kvm_para: guest side for eoi avoidance
On Tue, May 08, 2012 at 08:45:39AM -0700, H. Peter Anvin wrote:
> 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
Will do. OK to only define them for x86 for now?
They would be unused on other arches even if I defined them ...
> --
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists