From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752754AbbICIw5 (ORCPT ); Thu, 3 Sep 2015 04:52:57 -0400 Received: from blu004-omc1s15.hotmail.com ([65.55.116.26]:53557 "EHLO BLU004-OMC1S15.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751885AbbICIwx (ORCPT ); Thu, 3 Sep 2015 04:52:53 -0400 X-TMN: [ugGSy1We5B106wAZiSKOEjifGOtFOJdQ3EiccFMznf8=] X-Originating-Email: [wanpeng.li@hotmail.com] Message-ID: Subject: Re: [PATCH v6 2/3] KVM: dynamic halt_poll_ns adjustment To: Paolo Bonzini , David Matlack References: <1441178971-3836-1-git-send-email-wanpeng.li@hotmail.com> <55E74A03.7020508@redhat.com> <55E7F75B.2030502@redhat.com> CC: kvm list , "linux-kernel@vger.kernel.org" From: Wanpeng Li Date: Thu, 3 Sep 2015 16:52:01 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55E7F75B.2030502@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Sep 2015 08:52:51.0925 (UTC) FILETIME=[EAAED850:01D0E625] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/3/15 3:31 PM, Paolo Bonzini wrote: > > On 02/09/2015 21:23, David Matlack wrote: >> I actually wasn't thinking about vcpu->halt_poll_ns though. If >> single_task_running() breaks us out of the loop we will "goto out" instead >> of scheduling. My suspicion is this will cause us to loop calling >> kvm_vcpu_block and starve the waiting task (at least until need_resched()), >> which would break the "only hog the cpu when idle" aspect of halt-polling. > That's definitely a bug, yes. Ok, I will send out v7 to fix this in this sunday since there is vacation in my country currently. Regards, Wanpeng Li > > Paolo