Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752499AbbKYPnO (ORCPT ); Wed, 25 Nov 2015 10:43:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33179 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbbKYPnN (ORCPT ); Wed, 25 Nov 2015 10:43:13 -0500 Date: Wed, 25 Nov 2015 16:43:09 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: "Wu, Feng" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts Message-ID: <20151125154308.GD13925@potion.brq.redhat.com> References: <1447037208-75615-1-git-send-email-feng.wu@intel.com> <20151116190314.GA12245@potion.brq.redhat.com> <20151124143154.GB13925@potion.brq.redhat.com> <20151125141238.GC13925@potion.brq.redhat.com> <5655C7C9.1010008@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5655C7C9.1010008@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1442 Lines: 28 2015-11-25 15:38+0100, Paolo Bonzini: > On 25/11/2015 15:12, Radim Krcmár wrote: >> I think it's ok to pick any algorithm we like. It's unlikely that >> software would recognize and take advantage of the hardware algorithm >> without adding a special treatment for KVM. >> (I'd vote for the simple pick-first-APIC lowest priority algorithm ... >> I don't see much point in complicating lowest priority when it doesn't >> deliver to lowest priority CPU anyway.) > > Vector hashing is an improvement for the common case where all vectors > are set to all CPUs. Sure you can get an unlucky assignment, but it's > still better than pick-first-APIC. Yeah, hashing has a valid use case, but a subtle weighting of drawbacks led me to prefer pick-first-APIC ... (I'd prefer to have simple code in KVM and depend on static IRQ balancing in a guest to handle the distribution. The guest could get the unlucky assignment anyway, so it should be prepared; and hashing just made KVM worse in that case. Guests might also configure physical x(2)APIC, where is no lowest priority. And if the guest doesn't do anything with IRQs, then it might not even care about the impact that our choice has.) -- 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/