From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v6 2/3] KVM: dynamic halt_poll_ns adjustment Date: Thu, 3 Sep 2015 09:31:39 +0200 Message-ID: <55E7F75B.2030502@redhat.com> References: <1441178971-3836-1-git-send-email-wanpeng.li@hotmail.com> <55E74A03.7020508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Wanpeng Li , kvm list , "linux-kernel@vger.kernel.org" To: David Matlack Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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. Paolo