From: Peter Zijlstra <peterz@infradead.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc Zyngier <maz@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
tglx@linutronix.de, kvm@vger.kernel.org,
Davidlohr Bueso <dbueso@suse.de>,
torvalds@linux-foundation.org, bigeasy@linutronix.de,
linux-kernel@vger.kernel.org, rostedt@goodmis.org,
linux-mips@vger.kernel.org, Paul Mackerras <paulus@ozlabs.org>,
joel@joelfernandes.org, will@kernel.org,
kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH 4/5] kvm: Replace vcpu->swait with rcuwait
Date: Thu, 23 Apr 2020 11:19:11 +0200 [thread overview]
Message-ID: <20200423091911.GP20730@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <f07f6f55-9339-04b0-3877-d3240abd6d9c@redhat.com>
On Thu, Apr 23, 2020 at 10:57:57AM +0200, Paolo Bonzini wrote:
> On 23/04/20 10:41, Marc Zyngier wrote:
> >>
> >> - if (swait_active(kvm_arch_vcpu_wq(vcpu)))
> >> + if (rcu_dereference(kvm_arch_vpu_get_wait(vcpu)) != NULL)
> > This doesn't compile (wrong function name, and rcu_dereference takes a
> > variable). But whatever it would do if we fixed it looks dodgy. it isn't
> > the rcuwait structure that you want to dereference, but rcuwait->task
> > (we are checking whether we are called because we are blocking or being
> > preempted).
> >
>
> Yes, I agree. Replacing swait with rcuwait is all good, but please make
> the API look the same first. Just like you added prepare_to_rcuwait and
> finish_rcuwait, let's add rcuwait_active as well.
>
> Actually let's do it like this:
>
> 1) Davidlohr, please post only patches 1-3 to "equalize" the swait and
> rcuwait APIs.
>
> 2) Peter, please prepare a topic branch for those, or provide Acked-by
I don't think I have anything that conflicts with this, so sure, take
the whole thing through KVM.
For 1-3 (and I'll send a small niggle for 3 right after this):
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
I'll keep 5 as it is unrelated.
next prev parent reply other threads:[~2020-04-23 9:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 4:07 [PATCH v3 -tip 0/5] kvm: Use rcuwait for vcpu blocking Davidlohr Bueso
2020-04-22 4:07 ` [PATCH 1/5] rcuwait: Fix stale wake call name in comment Davidlohr Bueso
2020-04-22 4:07 ` [PATCH 2/5] rcuwait: Let rcuwait_wake_up() return whether or not a task was awoken Davidlohr Bueso
2020-04-22 4:07 ` [PATCH 3/5] rcuwait: Introduce prepare_to and finish_rcuwait Davidlohr Bueso
2020-04-23 9:23 ` Peter Zijlstra
2020-04-22 4:07 ` [PATCH 4/5] kvm: Replace vcpu->swait with rcuwait Davidlohr Bueso
2020-04-22 8:32 ` Paolo Bonzini
2020-04-22 10:14 ` Marc Zyngier
2020-04-23 8:41 ` Marc Zyngier
2020-04-23 8:57 ` Paolo Bonzini
2020-04-23 9:19 ` Peter Zijlstra [this message]
2020-04-23 9:26 ` Paolo Bonzini
2020-04-22 4:07 ` [PATCH 5/5] sched/swait: Reword some of the main description Davidlohr Bueso
2020-05-01 18:22 ` [tip: sched/core] " tip-bot2 for Davidlohr Bueso
2020-04-22 11:33 ` [PATCH v3 -tip 0/5] kvm: Use rcuwait for vcpu blocking Peter Zijlstra
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=20200423091911.GP20730@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=joel@joelfernandes.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maz@kernel.org \
--cc=paulus@ozlabs.org \
--cc=pbonzini@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will@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).