From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847AbbKPPKQ (ORCPT ); Mon, 16 Nov 2015 10:10:16 -0500 Received: from www.linutronix.de ([62.245.132.108]:41101 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbbKPPKO (ORCPT ); Mon, 16 Nov 2015 10:10:14 -0500 Date: Mon, 16 Nov 2015 16:09:32 +0100 (CET) From: Thomas Gleixner To: Qais Yousef cc: linux-kernel@vger.kernel.org, jason@lakedaemon.net, marc.zyngier@arm.com, jiang.liu@linux.intel.com, ralf@linux-mips.org, linux-mips@linux-mips.org Subject: Re: [PATCH 07/14] genirq: Add a new generic IPI reservation code to irq core In-Reply-To: <56407055.6080602@imgtec.com> Message-ID: References: <1446549181-31788-1-git-send-email-qais.yousef@imgtec.com> <1446549181-31788-8-git-send-email-qais.yousef@imgtec.com> <56407055.6080602@imgtec.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Nov 2015, Qais Yousef wrote: > On 11/07/2015 01:31 PM, Thomas Gleixner wrote: > > On Tue, 3 Nov 2015, Qais Yousef wrote: > > > + > > > + /* always allocate a virq per cpu */ > > > + nr_irqs = ipi_mask_weight(dest); > > That's not really a good assumption. Not all architectures need > > seperate interrupt numbers / descriptors because they can allocate > > from a per cpu interrupt space. We really want to handle that here as > > well. So we need a flag in the IPI domain which tells us whether that > > allocation needs to be weight(desc) or 1. > > OK. But is it bad to always allocate the weight? I thought allocating virqs is > cheap, or maybe not? It's wrong to allocate the descriptors in the case of per cpu interrupts. Aside of wasting memory its not representing what the hardware does. Thanks, tglx