From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: A problem about optimize the kvm_vcpu_on_spin Date: Mon, 14 Nov 2016 03:56:15 -0500 (EST) Message-ID: <822509139.12568024.1479113775757.JavaMail.zimbra@redhat.com> References: <58291719.4020401@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , "Wubin (H)" , zhaoshenglong , kvm To: "Longpeng (Mike)" Return-path: Received: from mx6-phx2.redhat.com ([209.132.183.39]:49225 "EHLO mx6-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752596AbcKNI41 (ORCPT ); Mon, 14 Nov 2016 03:56:27 -0500 In-Reply-To: <58291719.4020401@huawei.com> Sender: kvm-owner@vger.kernel.org List-ID: > Intel sdm vol3 ch-25.1.3 (p-1074) said: The “PAUSE-loop exiting” VM-execution > control is ignored if CPL > 0. > > Does this means that only guest's kernelspace spinlock could causes VMexit > due to "pause-loop exiting" ? > > If so, I think the kvm_vcpu_on_spin should selects a (currently not > running) vcpu which cpl=0 to boost, because the cpl>0 vcpus are not > the lock-holder. (suppose the guest isn't RT-linux) > > What about your opinion ? Yes, that's a good idea! Paolo