From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fN0Rw-0003Kr-TO for speck@linutronix.de; Sun, 27 May 2018 20:31:25 +0200 Date: Sun, 27 May 2018 11:31:21 -0700 From: Andi Kleen Subject: [MODERATED] Re: L1D-Fault KVM mitigation Message-ID: <20180527183121.GD4486@tassilo.jf.intel.com> References: <1524563292.8691.38.camel@infradead.org> <20180424110445.GU4043@hirez.programming.kicks-ass.net> <1527068745.8186.89.camel@infradead.org> <20180524094526.GE12198@hirez.programming.kicks-ass.net> <20180526204319.GB4486@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Sun, May 27, 2018 at 05:42:46PM +0200, speck for Thomas Gleixner wrote: > Whatever the guest mode does is irrelevant. Idle in the guest means already exited to the host because HLT exit is always enabled. > > and this ping pong goes on 10 times in a row taking 2+ milliseconds and the > progress made is the guest is minimal. The reason for this are interrupts > targeted to one of the vCPUs or operations in one of the guest threads > which cause several exits in a row. And there is nothing you can do about > that. It's completely workload dependent. There's a threshold of the exit rate somewhere where HT off is probably better, but I don't think we really have characterized well so far where exactly this threshold is. My suspicion is that a lot of workloads will be below the threshold. We'll see what works out. > > So unless you have a fully controlled scenario where the guests almost > never exit, the whole synchronization stuff is doomed. But fully controlled > means a 1:1 relationship of physical and virtual CPUs like David mentioned. > Yes, that stuff can benefit, but then we rather want ucode assistance than > the whole wait/IPI dance in software. Right that would be an obvious optimization. However in the traces I looked so far the IPI was actually not the most expensive part. I think it's because IPIs between siblings are not very expensive. -Andi