Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754412AbbKXOib (ORCPT ); Tue, 24 Nov 2015 09:38:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43954 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754271AbbKXOi3 (ORCPT ); Tue, 24 Nov 2015 09:38:29 -0500 Subject: Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts To: =?UTF-8?Q?Radim_Krcm=c3=a1r?= , "Wu, Feng" 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> Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Paolo Bonzini Message-ID: <56547662.7020804@redhat.com> Date: Tue, 24 Nov 2015 15:38:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151124143557.GA24676@potion.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 31 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. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/