Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1689740imu; Wed, 28 Nov 2018 13:30:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQq7HNjskZrdCiiH6VbXtjMVJyU6gPpPXo5dHKI+j1wEfNJb53wpHELufk6zIgso8kJ+oz X-Received: by 2002:a62:32c4:: with SMTP id y187mr2378994pfy.195.1543440629638; Wed, 28 Nov 2018 13:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543440629; cv=none; d=google.com; s=arc-20160816; b=arNlzMSQA0axudlxKot4fPTUW+/zNKYogk5dEjlje5BOSsw21LP7NqtDWHpK6Wj7Pq XlIqhVtjkFmvreGI+I5eFiHTLRbRhoi6iykb3CtyUcFhx+ClbgZwMhypVOxEv0il/L/3 pruRg4jwalydBv3MkQISaw7MbfdpCG9Qo9pzPr2zPimxKDLeXPN4BJG5O9DtYBkztflk YEh+l1G+MsIazE2Z/BjDhiuZaJuo6l74OIAc3/TOzNqbo3cDPB6XNFTYdB6PjsgGO5Ih TxLhqEBv7ajG4XMHRQsPrHBbTCIdqTDy64c3EHUvEe9d1u38Drr+ugSGkF6xSxM3bg5s P7KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=1+h7BbRZj2DMXe62UCk11IpRF/RzHsK8hlROPCxg6eU=; b=K9gYTRTyh9aqR3P59+4awhXJ/IZlzl4UQpVYlK8ZRahEoP9tB/pfv55VFAL7l/q35+ xtcmDXoDppuCkXQo/Mw8Ew8mmCe0KY87fZFBcKsJWJ7tCRbg0W3pxRCYUJBr7PewNxvN ViJRkx6//vIlDDvZ9i1hdsviLeBIgn+mmy+dteXldYkvE7u7bsnxagAXIC8QiPA+JmFq AmLQEz1qZqHONlxtGnIfTpLJNRRPtUfU6WXzEvjhfH55UAPnBcXhqWTup1stfIRsBRhw HBAxg2/IlvXQNQ+3V3HpDHvdWtHB/cDjQZSJ83DuHLwDX2Mc4IU51CqwkVyHQENRlZUP JyqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si7955575pgk.27.2018.11.28.13.30.14; Wed, 28 Nov 2018 13:30:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbeK2Ib0 (ORCPT + 99 others); Thu, 29 Nov 2018 03:31:26 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:32983 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbeK2Ib0 (ORCPT ); Thu, 29 Nov 2018 03:31:26 -0500 Received: from p4fea46ac.dip0.t-ipconnect.de ([79.234.70.172] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gS7Nd-0000m7-Oe; Wed, 28 Nov 2018 22:28:21 +0100 Date: Wed, 28 Nov 2018 22:28:20 +0100 (CET) From: Thomas Gleixner To: Bjorn Helgaas cc: douliyangs@gmail.com, Linux Kernel Mailing List , Kashyap Desai , shivasharan.srikanteshwara@broadcom.com, Sumit Saxena , ming.lei@redhat.com, Christoph Hellwig , linux-pci@vger.kernel.org Subject: Re: [RFC PATCH v3] genirq/affinity: Create and transfer more irq desc info by a new structure In-Reply-To: Message-ID: References: <20181128164503.6194-1-douliyangs@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Nov 2018, Bjorn Helgaas wrote: > On Wed, Nov 28, 2018 at 10:45 AM Dou Liyang wrote: > > if (affd) > > - masks = irq_create_affinity_masks(nvec, affd); > > - > > + affi_desc = irq_create_affinity_desc(nvec, affd); > > > > /* MSI Entry Initialization */ > > - entry = alloc_msi_entry(&dev->dev, nvec, masks); > > + entry = alloc_msi_entry(&dev->dev, nvec, affi_desc); > > Can you split this into two or more patches? Most of these changes > are trivial and not very interesting, and the fact that they're all in > one patch makes it hard to find and review the interesting bits. For > example, > > 1) Rename all the local variables while keeping the type the same > (or just leave the name the same; I think "affinity" would be a fine > name, and I would be OK if we ended up with "struct irq_affinity_desc > *masks" or "struct irq_affinity_desc *affinity"). This patch would > obviously have no functional impact and would remove a lot of the > trivial changes. > > 2) Add "struct irq_affinity_desc" containing only "struct cpumask > masks" and irq_create_affinity_desc() (or leave the name as > irq_create_affinity_masks() and adjust the signature). This would > also have no functional impact and would be a fairly trivial patch. > > 3) Add "flags" to struct irq_affinity_desc and the related code. > This is the real meat of your patch, and with the above out of the > way, it will be much smaller and it'll be obvious what the important > changes are. You beat me to it. I was going to ask the same thing. Albeit I'll go over the conceptual stuff right now as I roughly know what it tries to achieve. Thanks, tglx