From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752676AbdFSX70 (ORCPT ); Mon, 19 Jun 2017 19:59:26 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39830 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752561AbdFSX7Y (ORCPT ); Mon, 19 Jun 2017 19:59:24 -0400 Message-Id: <20170619233700.547167146@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 20 Jun 2017 01:37:00 +0200 From: Thomas Gleixner To: LKML Cc: Marc Zyngier , Christoph Hellwig , Ingo Molnar , Peter Zijlstra , Michael Ellerman , Jens Axboe , Keith Busch Subject: [patch 00/55] genirq: Debuggability, consolidation and managed affinities Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This started out with 5 patches from Christoph who wanted to add a mechanism for interrupts with managed affinities to spread them over all present CPUs and instead of migrating them, shut them down into managed shutdown state when the last CPU in the affinity set goes offline and then resume them when a CPU to which belongs to the affinity set comes online again. See: http://lkml.kernel.org/r/20170603140403.27379-1-hch@lst.de After staring at it for a while it became clear that the approach is not sufficient to deal with all the oddities of the x86 interrupt handling. The mechanism to migrate interrupts inside the affinity set or shut them down when the last CPU of the set goes offline is the same as the general cpu hotplug migration mechanism. x86 does not use yet the generic cpu hotplug irq migration code, so supporting this feature would require changes to both architecture and core code. After staring long enough, I decided to extend the core migration code so it can handle the x86 oddities as well. There are a few subtle changes in that code which might affect the existing users (ARM64/POWERPC), but AFAICT they should not change the behaviour. Please look carefully. While doing this I stumbled over a bunch of other details, which I addressed in seperate patches. Once again the missing ability to debug all of this turned out to be a major pain. So I hacked a quick debugfs tool, which helped me to sort out the details. I rewrote that proper and it's included in the start of the series. This also required to extend the fwnode so x86 can supply unique domain names on domain creation. The series applies on git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core and is also available via git from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.irq Thanks, tglx ---- arch/x86/Kconfig | 2 arch/x86/include/asm/apic.h | 36 +---- arch/x86/include/asm/irq.h | 1 arch/x86/include/asm/irq_remapping.h | 3 arch/x86/kernel/apic/apic.c | 35 +++-- arch/x86/kernel/apic/apic_flat_64.c | 4 arch/x86/kernel/apic/apic_noop.c | 2 arch/x86/kernel/apic/apic_numachip.c | 4 arch/x86/kernel/apic/bigsmp_32.c | 2 arch/x86/kernel/apic/htirq.c | 21 ++- arch/x86/kernel/apic/io_apic.c | 22 +++ arch/x86/kernel/apic/msi.c | 55 ++++++-- arch/x86/kernel/apic/probe_32.c | 2 arch/x86/kernel/apic/vector.c | 49 +++++-- arch/x86/kernel/apic/x2apic_cluster.c | 36 ++--- arch/x86/kernel/apic/x2apic_phys.c | 2 arch/x86/kernel/apic/x2apic_uv_x.c | 26 +--- arch/x86/kernel/irq.c | 78 ------------ arch/x86/platform/uv/uv_irq.c | 18 ++ arch/x86/xen/apic.c | 2 drivers/iommu/amd_iommu.c | 22 ++- drivers/iommu/intel_irq_remapping.c | 31 +++- drivers/pci/host/vmd.c | 8 + drivers/xen/events/events_base.c | 6 include/linux/cpuhotplug.h | 1 include/linux/irq.h | 61 +++++++++ include/linux/irqdesc.h | 4 include/linux/irqdomain.h | 37 +++++ kernel/cpu.c | 5 kernel/irq/Kconfig | 15 ++ kernel/irq/Makefile | 1 kernel/irq/affinity.c | 76 +++++++++-- kernel/irq/autoprobe.c | 4 kernel/irq/chip.c | 91 ++++++++++++-- kernel/irq/cpuhotplug.c | 150 +++++++++++++++++++---- kernel/irq/debugfs.c | 220 ++++++++++++++++++++++++++++++++++ kernel/irq/internals.h | 100 +++++++++++++++ kernel/irq/irqdesc.c | 30 +++- kernel/irq/irqdomain.c | 170 ++++++++++++++++++++++++-- kernel/irq/manage.c | 102 ++++----------- kernel/irq/migration.c | 30 ++++ kernel/irq/msi.c | 3 kernel/irq/proc.c | 110 ++++++++++++++--- 43 files changed, 1294 insertions(+), 383 deletions(-)