From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7WVV-0001BT-SK for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:22:33 -0400 Received: from [140.186.70.92] (port=60164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7WVT-0001AK-NG for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7WVP-0003H2-KI for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:22:31 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:18691) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7WVP-0003Gb-EK for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:22:27 -0400 Received: by fg-out-1718.google.com with SMTP id 19so3901486fgg.10 for ; Thu, 29 Apr 2010 09:22:24 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 29 Apr 2010 18:22:24 +0200 Message-ID: From: Jiaqing Du Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] Question on cpu_interrupt() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, I am trying to inject NMIs to a guest running in QEMU by using cpu_interrupt(). I notice that QEMU slows down significantly when NMIs are being injected. The injected NMIs per second is around 10. QEMU is pined to one core. A computation intensive application runs in the guest. When no NMIs are being injected, the physical CPU utilization is 100%; while NMIs are injected by calling cpu_interrupt(), the physical CPU utilization rate drops to around 30%. As far as I know from reading the code, cpu_interrupt() unchains the translation cache. So when the current TB is executed over, QEMU code is executed to handle the interrupt. I also notice that cpu_interrupt() is called very frequently normally. Why QEMU's performance drops so much when NMIs are being injected? Please CC me your reply. Thanks, Jiaqing