From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbdI2Qkp (ORCPT ); Fri, 29 Sep 2017 12:40:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33386 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbdI2Qkn (ORCPT ); Fri, 29 Sep 2017 12:40:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6E81685541 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mtosatti@redhat.com Date: Fri, 29 Sep 2017 13:40:06 -0300 From: Marcelo Tosatti To: Paolo Bonzini Cc: Peter Zijlstra , Konrad Rzeszutek Wilk , mingo@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall\ Message-ID: <20170929164006.GC29391@amt.cnet> References: <855950672.7912001.1506258344142.JavaMail.zimbra@redhat.com> <20170925025751.GB30813@amt.cnet> <20170925091316.bnwpiscs2bvpdxk5@hirez.programming.kicks-ass.net> <00ff8cbf-4e41-a950-568c-3bd95e155d4b@redhat.com> <20170926224925.GA9119@amt.cnet> <6f4afefd-8726-13ff-371e-0d3896b4cf6a@redhat.com> <20170928004452.GA30040@amt.cnet> <10635834-459a-9ec1-624d-febd6b5af243@redhat.com> <20170928213508.GA14053@amt.cnet> <06b714d8-7b66-6e03-a992-e359241abf84@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06b714d8-7b66-6e03-a992-e359241abf84@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 29 Sep 2017 16:40:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 29, 2017 at 10:18:25AM +0200, Paolo Bonzini wrote: > On 28/09/2017 23:35, Marcelo Tosatti wrote: > > On Thu, Sep 28, 2017 at 09:22:02AM +0200, Paolo Bonzini wrote: > >> On 28/09/2017 02:44, Marcelo Tosatti wrote: > >>>> Again: if you have many interruptions, it's not a flaw in KVM or QEMU's > >>>> design, it's just that someone is doing something stupid. It could be > >>>> the guest (e.g. unnecessary devices or daemons as in the example above), > >>>> QEMU (e.g. the RTC emulation used to trigger QEMU timers twice a second > >>>> just to increment the clock), or the management (e.g. polling "is the VM > >>>> running" 50 times per second). But it can and must be fixed. > >>> > >>> No, i mean you can run anything in VCPU-0 (it is valid to do that). > >>> And that "anything" can generate 1 interrupt per second, 1000 or 10.000 > >>> interrupts per second. Which are all valid things to be done. > >>> > >>> "I can't run a kernel compilation on VCPU-0 because that will impact > >>> latency on the realtime VCPU-1" is not acceptable. > >> > >> That shouldn't happen. Sources of frequent interruptions have all been > >> fixed or moved outside the main thread. > >> > >> If there are more left, report the bug and we'll see how to fix it in > >> userspace. > > > > What should not happen? The generation of 10.000 interrupts per second > > (say disk IO completion) on a given workload ? > > If you know you have this kind disk workload, you must use virtio-blk or > virtio-scsi with iothreads and place the iothreads on their own physical > CPUs. > > Among "run arbitrary workloads", "run real-time workloads", "pack stuff > into as few physical CPUs as possible", you can only pick two. > > Paolo Thats not the state of things (userspace in vcpu-0 is not specially tailored to not violate latencies in vcpu-1): that is not all user triggered actions can be verified. Think "updatedb", and so on...