Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbbHVHFA (ORCPT ); Sat, 22 Aug 2015 03:05:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45267 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbbHVHE7 (ORCPT ); Sat, 22 Aug 2015 03:04:59 -0400 Subject: Re: [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit To: Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org References: <1439546917-17391-1-git-send-email-rkrcmar@redhat.com> <1439546917-17391-3-git-send-email-rkrcmar@redhat.com> Cc: kvm@vger.kernel.org, Christian Borntraeger From: Paolo Bonzini Message-ID: <55D81F17.8000907@redhat.com> Date: Sat, 22 Aug 2015 00:04:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 24 On 19/08/2015 20:55, Wanpeng Li wrote: >> The disadvantage is that it adds an overhead of one bit check for all >> kernel exits. A quick tracing shows that the ratio of userspace exits >> after boot is about 1/5 and in subsequent run of nmap and kernel compile >> has about 1/60, so the check should not regress global performance. >> >> All signal_pending() calls are userspace exit requests, so we add a >> check for KVM_REQ_EXIT there. There is one omitted call in kvm_vcpu_run >> because KVM_REQ_EXIT is implied in earlier check for requests. > > Actually I see more SIGUSR1 signals are intercepted by signal_pending() > in vcpu_enter_guest() and vcpu_run() w/ win7 guest and kernel_irqchip=off. You need more patches on the QEMU side. I tested a version that is mostly okay but not ready for upstream inclusion. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/