From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752533AbdHOMCD (ORCPT ); Tue, 15 Aug 2017 08:02:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:52626 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751738AbdHOMCC (ORCPT ); Tue, 15 Aug 2017 08:02:02 -0400 Date: Tue, 15 Aug 2017 14:01:55 +0200 (CEST) From: Thomas Gleixner To: Marc Zyngier cc: linux-kernel@vger.kernel.org, Wei Xu , James Hogan , Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Kevin Cernekee , Florian Fainelli , Chris Zankel , Max Filippov , Paul Burton , Matt Redfearn Subject: Re: [PATCH 01/12] genirq: Restrict effective affinity to single-target interrupts In-Reply-To: <20170815113447.14507-2-marc.zyngier@arm.com> Message-ID: References: <20170815113447.14507-1-marc.zyngier@arm.com> <20170815113447.14507-2-marc.zyngier@arm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Aug 2017, Marc Zyngier wrote: > Just because CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is selected > doesn't mean that all the interrupts are using the effective > affinity mask. For a number of them, this mask is likely to > be empty. > > In order to deal with this, let's restrict the use of the > effective affinity mask to these interrupts that have been > configured as "single target". That's actually wrong. On X86 we have other restrictions, i.e. groups of CPUs which are a subset of the affinity mask. The point of the effective mask is to see to which CPU(s) a particular interrupt is effectively routed. This is always a subset of the affinity mask which is either the boot default or set by the admin. So what you really want is to check whether the effective mask is empty. That's an indicator that the underlying irq chip does not update the effective mask. The single target bit is an optimization for the hotplug case. If its set, then we can avoid to reconfigure the affinity for that interrupt because it either would not change or pointlessly be redirected to another single CPU in the valid set. Thanks, tglx