From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock Date: Tue, 17 Jan 2012 17:32:33 +0200 Message-ID: <20120117153233.GA7911@redhat.com> References: <4F13E739.7040300@redhat.com> <20120116094020.GA6019@linux.vnet.ibm.com> <4F13F883.5090002@redhat.com> <20120116141117.GB6019@linux.vnet.ibm.com> <20120117091413.GM2167@redhat.com> <20120117122650.GC30757@linux.vnet.ibm.com> <20120117125126.GQ2167@redhat.com> <20120117131103.GD30398@linux.vnet.ibm.com> <20120117132051.GR2167@redhat.com> <20120117142818.GE30398@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jeremy Fitzhardinge , Raghavendra K T , KVM , linux-doc@vger.kernel.org, Peter Zijlstra , Jan Kiszka , Virtualization , Paul Mackerras , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , Glauber Costa , X86 , Ingo Molnar , Avi Kivity , Rik van Riel , Konrad Rzeszutek Wilk , Sasha Levin , Sedat Dilek , Thomas Gleixner , Greg Kroah-Hartman , LKML , Dave Hansen Return-path: Content-Disposition: inline In-Reply-To: <20120117142818.GE30398@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: kvm.vger.kernel.org On Tue, Jan 17, 2012 at 07:58:18PM +0530, Srivatsa Vaddagiri wrote: > * Gleb Natapov [2012-01-17 15:20:51]: > > > > Having the hypercall makes the intent of vcpu (to sleep on a kick) clear to > > > hypervisor vs assuming that because of a trapped HLT instruction (which > > > will anyway won't work when yield_on_hlt=0). > > > > > The purpose of yield_on_hlt=0 is to allow VCPU to occupy CPU for the > > entire time slice no mater what. I do not think disabling yield on HLT > > is even make sense in CPU oversubscribe scenario. > > Yes, so is there any real use for yield_on_hlt=0? I believe Anthony > initially added it as a way to implement CPU bandwidth capping for VMs, > which would ensure that busy VMs don't eat into cycles meant for a idle > VM. Now that we have proper support in scheduler for CPU bandwidth capping, is > there any real world use for yield_on_hlt=0? If not, deprecate it? > I was against adding it in the first place, so if IBM no longer needs it I am for removing it ASAP. > > Now if you'll call > > KVM_HC_WAIT_FOR_KICK instead of HLT you will effectively ignore > > yield_on_hlt=0 setting. > > I guess that depends on what we do in KVM_HC_WAIT_FOR_KICK. If we do > yield_to() rather than sleep, it should minimize how much cycles vcpu gives away > to a competing VM (which seems to be the biggest purpose why one may > want to set yield_on_hlt=0). > > > This is like having PV HLT that does not obey > > VMX exit control setting. > > - vatsa -- Gleb. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock Date: Tue, 17 Jan 2012 17:32:33 +0200 Message-ID: <20120117153233.GA7911@redhat.com> References: <4F13E739.7040300@redhat.com> <20120116094020.GA6019@linux.vnet.ibm.com> <4F13F883.5090002@redhat.com> <20120116141117.GB6019@linux.vnet.ibm.com> <20120117091413.GM2167@redhat.com> <20120117122650.GC30757@linux.vnet.ibm.com> <20120117125126.GQ2167@redhat.com> <20120117131103.GD30398@linux.vnet.ibm.com> <20120117132051.GR2167@redhat.com> <20120117142818.GE30398@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120117142818.GE30398@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Srivatsa Vaddagiri Cc: Jeremy Fitzhardinge , Raghavendra K T , KVM , linux-doc@vger.kernel.org, Peter Zijlstra , Jan Kiszka , Virtualization , Paul Mackerras , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , Glauber Costa , X86 , Ingo Molnar , Avi Kivity , Rik van Riel , Konrad Rzeszutek Wilk , Sasha Levin , Sedat Dilek , Thomas Gleixner , Greg Kroah-Hartman , LKML Dave Hansen List-Id: virtualization@lists.linuxfoundation.org On Tue, Jan 17, 2012 at 07:58:18PM +0530, Srivatsa Vaddagiri wrote: > * Gleb Natapov [2012-01-17 15:20:51]: > > > > Having the hypercall makes the intent of vcpu (to sleep on a kick) clear to > > > hypervisor vs assuming that because of a trapped HLT instruction (which > > > will anyway won't work when yield_on_hlt=0). > > > > > The purpose of yield_on_hlt=0 is to allow VCPU to occupy CPU for the > > entire time slice no mater what. I do not think disabling yield on HLT > > is even make sense in CPU oversubscribe scenario. > > Yes, so is there any real use for yield_on_hlt=0? I believe Anthony > initially added it as a way to implement CPU bandwidth capping for VMs, > which would ensure that busy VMs don't eat into cycles meant for a idle > VM. Now that we have proper support in scheduler for CPU bandwidth capping, is > there any real world use for yield_on_hlt=0? If not, deprecate it? > I was against adding it in the first place, so if IBM no longer needs it I am for removing it ASAP. > > Now if you'll call > > KVM_HC_WAIT_FOR_KICK instead of HLT you will effectively ignore > > yield_on_hlt=0 setting. > > I guess that depends on what we do in KVM_HC_WAIT_FOR_KICK. If we do > yield_to() rather than sleep, it should minimize how much cycles vcpu gives away > to a competing VM (which seems to be the biggest purpose why one may > want to set yield_on_hlt=0). > > > This is like having PV HLT that does not obey > > VMX exit control setting. > > - vatsa -- Gleb.