From: Peter Zijlstra <peterz@infradead.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Like Xu <like.xu@linux.intel.com>,
kvm@vger.kernel.org, rkrcmar@redhat.com,
sean.j.christopherson@intel.com, vkuznets@redhat.com,
Jim Mattson <jmattson@google.com>, Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
ak@linux.intel.com, wei.w.wang@intel.com, kan.liang@intel.com,
like.xu@intel.com, ehankland@google.com, arbel.moshe@oracle.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: x86/vPMU: Add lazy mechanism to release perf_event per vPMC
Date: Wed, 9 Oct 2019 11:32:10 +0200 [thread overview]
Message-ID: <20191009093210.GK2328@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <795f5e36-0211-154f-fcf0-f2f1771bf724@redhat.com>
On Wed, Oct 09, 2019 at 11:21:30AM +0200, Paolo Bonzini wrote:
> On 09/10/19 10:16, Peter Zijlstra wrote:
> >> bool bitfields preserve the magic behavior where something like this:
> >>
> >> foo->x = y;
> >>
> >> (x is a bool bitfield) would be compiled as
> >>
> >> foo->x = (y != 0);
> >
> > This is confusion; if y is a single bit bitfield, then there is
> > absolutely _NO_ difference between these two expressions.
>
> y is not in a struct so it cannot be a single bit bitfield. :) If y is
> an int and foo->x is a bool bitfield, you get the following:
>
> foo->x = 6; /* foo->x is 1, it would be 0 for int:1 */
> foo->x = 7; /* foo->x is 1, it would be 1 for int:1 */
>
Urgh, reading hard. You're right!
prev parent reply other threads:[~2019-10-09 9:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 7:22 [PATCH 0/3] KVM: x86/vPMU: Efficiency optimization by reusing last created perf_event Like Xu
2019-09-30 7:22 ` [PATCH 1/3] perf/core: Provide a kernel-internal interface to recalibrate event period Like Xu
2019-10-01 2:27 ` kbuild test robot
2019-10-01 2:46 ` kbuild test robot
2019-10-07 12:01 ` Paolo Bonzini
2019-10-07 13:25 ` Liang, Kan
2019-10-07 15:05 ` Paolo Bonzini
2019-09-30 7:22 ` [PATCH 2/3] KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter Like Xu
2019-10-01 8:22 ` Peter Zijlstra
2019-10-01 12:18 ` Like Xu
2019-09-30 7:22 ` [PATCH 3/3] KVM: x86/vPMU: Add lazy mechanism to release perf_event per vPMC Like Xu
2019-10-01 8:23 ` Peter Zijlstra
2019-10-01 12:33 ` Like Xu
2019-10-08 12:11 ` Peter Zijlstra
2019-10-09 3:14 ` Like Xu
2019-10-09 7:15 ` Paolo Bonzini
2019-10-09 8:07 ` Like Xu
2019-10-09 8:16 ` Peter Zijlstra
2019-10-09 9:21 ` Paolo Bonzini
2019-10-09 9:32 ` Peter Zijlstra [this message]
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=20191009093210.GK2328@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=arbel.moshe@oracle.com \
--cc=ehankland@google.com \
--cc=jmattson@google.com \
--cc=kan.liang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu@intel.com \
--cc=like.xu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=vkuznets@redhat.com \
--cc=wei.w.wang@intel.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
all inboxes | Powered by JetHome®