From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753137AbdFPKaL (ORCPT ); Fri, 16 Jun 2017 06:30:11 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53755 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbdFPKaK (ORCPT ); Fri, 16 Jun 2017 06:30:10 -0400 Date: Fri, 16 Jun 2017 12:29:59 +0200 (CEST) From: Thomas Gleixner To: Christoph Hellwig cc: Jens Axboe , Keith Busch , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/8] genirq/affinity: update CPU affinity for CPU hotplug events In-Reply-To: <20170603140403.27379-6-hch@lst.de> Message-ID: References: <20170603140403.27379-1-hch@lst.de> <20170603140403.27379-6-hch@lst.de> 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 Sat, 3 Jun 2017, Christoph Hellwig wrote: > +static void irq_affinity_online_irq(unsigned int irq, struct irq_desc *desc, > + unsigned int cpu) > +{ > + const struct cpumask *affinity; > + struct irq_data *data; > + struct irq_chip *chip; > + unsigned long flags; > + cpumask_var_t mask; > + > + if (!desc) > + return; > + if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) > + return; That's silly. Why want you to do that for each irq descriptor? That's outright silly. Either you allocated it in irq_affinity_[on|off]line_cpu() once or just make it a static cpumask. Lemme fix that up. Thanks, tglx