Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932116AbbKYB6d (ORCPT ); Tue, 24 Nov 2015 20:58:33 -0500 Received: from mga01.intel.com ([192.55.52.88]:25063 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753748AbbKYB6a (ORCPT ); Tue, 24 Nov 2015 20:58:30 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,341,1444719600"; d="scan'208";a="846499636" From: "Wu, Feng" To: Paolo Bonzini , =?utf-8?B?UmFkaW0gS3JjbcOhcg==?= CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Feng" Subject: RE: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts Thread-Topic: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts Thread-Index: AQHRIRwf7uN6i1xR7ke/FgyVZroC0p6qYglAgABggACAAACwAIABQZUA Date: Wed, 25 Nov 2015 01:58:26 +0000 Message-ID: References: <1447037208-75615-1-git-send-email-feng.wu@intel.com> <20151116190314.GA12245@potion.brq.redhat.com> <564AF645.5010506@redhat.com> <20151124143557.GA24676@potion.brq.redhat.com> <56547662.7020804@redhat.com> In-Reply-To: <56547662.7020804@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 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 base64 to 8bit by mail.home.local id tAP1wd3q025352 Content-Length: 2291 Lines: 50 > -----Original Message----- > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Sent: Tuesday, November 24, 2015 10:38 PM > To: Radim Krcmár ; Wu, Feng > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted- > interrupts > > > > On 24/11/2015 15:35, Radim Krcmár wrote: > > > Thanks for your guys' review. Yes, we can introduce a module option > > > for it. According to Radim's comments above, we need use the > > > same policy for PI and non-PI lowest-priority interrupts, so here is the > > > question: for vector hashing, it is easy to apply it for both non-PI and PI > > > case, however, for Round-Robin, in non-PI case, the round robin counter > > > is used and updated when the interrupt is injected to guest, but for > > > PI case, the interrupt is injected to guest totally by hardware, software > > > cannot control it while interrupt delivery, we can only decide the > > > destination vCPU for the PI interrupt in the initial configuration > > > time (guest update vMSI -> QEMU -> KVM). Do you guys have any good > > > suggestion to do round robin for PI lowest-priority? Seems Round robin > > > is not a good way for PI lowest-priority interrupts. Any comments > > > are appreciated! > > > > It's meaningless to try dynamic algorithms with PI so if we allow both > > lowest priority algorithms, I'd let PI handle any lowest priority only > > with vector hashing. (It's an ugly compromise.) > > For now, I would just keep the 4.4 behavior, i.e. disable PI unless > there is a single destination || vector hashing is enabled. We can flip > the switch later. Okay, let me try to understand this clearly: - We will have a new KVM command line parameter to indicate whether vector hashing is enabled. - If it is not enabled, for PI, we can only support single destination lowest priority interrupts, for non-PI, we continue to use RR. - If it is enabled, for PI and non-PI we use vector hashing for both of them. Is this the case you have in mind? Thanks a lot! Thanks, Feng > > Paolo ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?