Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933121AbdCURaJ (ORCPT ); Tue, 21 Mar 2017 13:30:09 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33966 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933064AbdCUR3f (ORCPT ); Tue, 21 Mar 2017 13:29:35 -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: <20170321165831.GC25540@potion> Date: Tue, 21 Mar 2017 10:29:32 -0700 Cc: "Michael S. Tsirkin" , "Gabriel L. Somlo" , LKML , Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Joerg Roedel , kvm@vger.kernel.org, linux-doc@vger.kernel.org Message-Id: <15F4973A-9D7E-46B9-97B9-A431A756C272@gmail.com> References: <20170316192622-mutt-send-email-mst@kernel.org> <20170316174149.GK4085@HEDWIG.INI.CMU.EDU> <20170316202024-mutt-send-email-mst@kernel.org> <20170316192440.GL4085@HEDWIG.INI.CMU.EDU> <20170316212635-mutt-send-email-mst@kernel.org> <20170316201710.GN4085@HEDWIG.INI.CMU.EDU> <20170316211414.GO4085@HEDWIG.INI.CMU.EDU> <20170317035716-mutt-send-email-mst@kernel.org> <20170317132355.GA10906@HEDWIG.INI.CMU.EDU> <20170321052102-mutt-send-email-mst@kernel.org> <20170321165831.GC25540@potion> To: =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= 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 v2LHUT4H028290 Content-Length: 804 Lines: 20 > On Mar 21, 2017, at 9:58 AM, Radim Krčmář wrote: > In '-smp 2', the writing VCPU always does 10000 wakeups by writing into > monitored memory, but the mwaiting VCPU can be also woken up by host > interrupts, which might add a few exits depending on timing. > > I didn't spend much time in making the PASS/FAIL mean much, or ensuring > that we only get 10000 wakeups ... it is nothing to be worried about. > > Hint 240 behaves as nop even on my system, so I still don't find > anything insane on that machine (if OS X is exluded) ... >From my days in Intel (10 years ago), I can say that MWAIT wakes for many microarchitecural events beside interrupts. Out of curiosity, aren’t you worried that on OS X the wbinvd causes an exit after the monitor and before the mwait?