From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v3 1/3] Introduce a workqueue to deliver PIT timer interrupts. Date: Wed, 18 Apr 2012 11:04:31 +0300 Message-ID: <20120418080431.GQ11918@redhat.com> References: <20120417102601.GF11918@redhat.com> <4F8D45F0.4020908@redhat.com> <20120417103106.GG11918@redhat.com> <4F8D4917.5000703@redhat.com> <20120417110506.GJ11918@redhat.com> <4F8D5B4A.6070904@redhat.com> <20120417120340.GL11918@redhat.com> <4F8D5CBD.1070004@redhat.com> <4F8D9709.3020409@siemens.com> <4F8D9787.3000804@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kiszka , "kvm@vger.kernel.org" , Marcelo Tosatti To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293Ab2DRIEf (ORCPT ); Wed, 18 Apr 2012 04:04:35 -0400 Content-Disposition: inline In-Reply-To: <4F8D9787.3000804@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 17, 2012 at 07:17:11PM +0300, Avi Kivity wrote: > On 04/17/2012 07:15 PM, Jan Kiszka wrote: > > On 2012-04-17 14:06, Avi Kivity wrote: > > > On 04/17/2012 03:03 PM, Gleb Natapov wrote: > > >>> > > >>> KVM_MAX_VCPUS. > > >>> > > >> Ah, so you are worried about malicious guest configuring pit to > > >> broadcast to all its vcpus. > > > > > > Yes - it can introduce huge amounts of latency this way which is exactly > > > what Jan is trying to prevent. > > > > > > Though I'm not sure spin_lock_irq() in the realtime tree actually > > > disables irqs (but it's certainly not a good idea in mainline; it's > > > nasty even with just the spinlock). > > > > This depends on how you declare the spin lock type - raw or normal. The > > former will disable irqs, the latter not even preemption (but become a > > mutex). > > Yes (and I see no reason to use raw spinlocks here). Still, for It was raw spinlock until f4f510508741680e423524c222f615276ca6222c. > mainline, are we okay with 254*IPIs? Maybe it's not so bad and I'm > overinflating the problem. > Isn't 254*IPIs can also happen if application changes memory mapping? -- Gleb.