From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suraj Jitindar Singh Subject: Re: [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module Date: Tue, 12 Jul 2016 16:33:10 +1000 Message-ID: <57848F26.3060505@gmail.com> References: <1468220912-22828-1-git-send-email-sjitindarsingh@gmail.com> <1468220912-22828-3-git-send-email-sjitindarsingh@gmail.com> <78e920ba-b596-5475-ff30-0dd2c23d97b6@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, mpe@ellerman.id.au, paulus@samba.org, benh@kernel.crashing.org, kvm list , agraf@suse.com, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: David Matlack , Paolo Bonzini Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:35515 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbcGLGdT (ORCPT ); Tue, 12 Jul 2016 02:33:19 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 12/07/16 03:26, David Matlack wrote: > On Mon, Jul 11, 2016 at 10:07 AM, Paolo Bonzini wrote: >> >> On 11/07/2016 18:57, David Matlack wrote: >>> On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh >>> wrote: >>>> This patch introduces new halt polling functionality into the kvm_hv kernel >>>> module. When a vcore is idle it will poll for some period of time before >>>> scheduling itself out. >>> Is there any way to reuse the existing halt-polling code? Having two >>> copies risks them diverging over time. >> s/risks/guarantees/ :( >> >> Unfortunately, handling of the hardware threads in KVM PPC is a mess, >> and I don't think it's possible to remove the duplication. > Ah, ok. That's a shame. It's definitely not ideal having this code duplicated, although we have the issue that on PPC we only poll once all of the vcpus on a vcore have ceded and need to retain a reference to that vcore. Additionally we only actually do this in HV code, on the KVM PR version we call the generic halt-polling code which doesn't know about vcores. I don't see an easy way to use the existing function. > >> Paolo