Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933428AbdCVACh (ORCPT ); Tue, 21 Mar 2017 20:02:37 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34464 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758498AbdCVACe (ORCPT ); Tue, 21 Mar 2017 20:02:34 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests From: Nadav Amit In-Reply-To: <20170321225116.GJ2231@HEDWIG.INI.CMU.EDU> Date: Tue, 21 Mar 2017 17:02:25 -0700 Cc: =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , "Michael S. Tsirkin" , LKML , Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Joerg Roedel , KVM list , linux-doc@vger.kernel.org Message-Id: <540BB5C2-CEAE-47D2-845B-2DDEF3CDC303@gmail.com> References: <20170321225116.GJ2231@HEDWIG.INI.CMU.EDU> To: Gabriel Somlo X-Mailer: Apple Mail (2.3259) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2M02jej029745 Content-Length: 762 Lines: 23 > On Mar 21, 2017, at 3:51 PM, Gabriel Somlo wrote: > > And I get the exact same results on the MacBookAir4,2 (which exhibits > no freezing or extreme sluggishness when running OS X 10.7 smp with > Michael's KVM MWAIT-in-L1 patch)... Sorry for my confusion. I didn’t read the entire thread and thought that the problem is spurious wake-ups. Since that is not the case, I would just suggest two things that you can freely ignore: 1. According to the SDM, when an interrupt is delivered, the interrupt is only delivered on the following instruction, so you may consider skipping the MWAIT first. 2. Perhaps the CPU changes for some reason GUEST_ACTIVITY_STATE (which is not according to the SDM). That is it. No more BS from me. Nadav