All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	yinghai@kernel.org, rusty@rustcorp.com.au, ebiederm@xmission.com,
	akpm@linux-foundation.org, suresh.b.siddha@intel.com,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:irq/numa] x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC
Date: Fri, 1 May 2009 17:06:42 GMT	[thread overview]
Message-ID: <tip-fcef5911c7ea89b80d5bfc727f402f37c9eefd57@git.kernel.org> (raw)
In-Reply-To: <49F654AF.8000808@kernel.org>

Commit-ID:  fcef5911c7ea89b80d5bfc727f402f37c9eefd57
Gitweb:     http://git.kernel.org/tip/fcef5911c7ea89b80d5bfc727f402f37c9eefd57
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Mon, 27 Apr 2009 17:58:23 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 28 Apr 2009 12:21:15 +0200

x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC

The original feature of migrating irq_desc dynamic was too fragile
and was causing problems: it caused crashes on systems with lots of
cards with MSI-X when user-space irq-balancer was enabled.

We now have new patches that create irq_desc according to device
numa node. This patch removes the leftover bits of the dynamic balancer.

[ Impact: remove dead code ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <49F654AF.8000808@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/Kconfig                  |   10 ------
 arch/x86/configs/x86_64_defconfig |    1 -
 arch/x86/kernel/apic/io_apic.c    |   56 ++----------------------------------
 include/linux/irq.h               |   10 ------
 kernel/irq/Makefile               |    2 +-
 kernel/irq/chip.c                 |   12 +------
 kernel/irq/handle.c               |    9 +----
 kernel/irq/numa_migrate.c         |    2 -
 8 files changed, 9 insertions(+), 93 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index df9e885..e1b2543 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -274,16 +274,6 @@ config SPARSE_IRQ
 
 	  If you don't know what to do here, say N.
 
-config NUMA_MIGRATE_IRQ_DESC
-	bool "Move irq desc when changing irq smp_affinity"
-	depends on SPARSE_IRQ && NUMA
-	depends on BROKEN
-	default n
-	---help---
-	  This enables moving irq_desc to cpu/node that irq will use handled.
-
-	  If you don't know what to do here, say N.
-
 config X86_MPPARSE
 	bool "Enable MPS table" if ACPI
 	default y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 9fe5d21..27b8ce0 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -195,7 +195,6 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_SMP=y
 CONFIG_SPARSE_IRQ=y
-# CONFIG_NUMA_MIGRATE_IRQ_DESC is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
 # CONFIG_X86_ELAN is not set
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 30da617..9fbf0f7 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -148,9 +148,6 @@ struct irq_cfg {
 	unsigned move_cleanup_count;
 	u8 vector;
 	u8 move_in_progress : 1;
-#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
-	u8 move_desc_pending : 1;
-#endif
 };
 
 /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
@@ -254,8 +251,7 @@ int arch_init_chip_data(struct irq_desc *desc, int cpu)
 	return 0;
 }
 
-#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
-
+/* for move_irq_desc */
 static void
 init_copy_irq_2_pin(struct irq_cfg *old_cfg, struct irq_cfg *cfg, int cpu)
 {
@@ -356,19 +352,7 @@ void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc)
 		old_desc->chip_data = NULL;
 	}
 }
-
-static void
-set_extra_move_desc(struct irq_desc *desc, const struct cpumask *mask)
-{
-	struct irq_cfg *cfg = desc->chip_data;
-
-	if (!cfg->move_in_progress) {
-		/* it means that domain is not changed */
-		if (!cpumask_intersects(desc->affinity, mask))
-			cfg->move_desc_pending = 1;
-	}
-}
-#endif
+/* end for move_irq_desc */
 
 #else
 static struct irq_cfg *irq_cfg(unsigned int irq)
@@ -378,13 +362,6 @@ static struct irq_cfg *irq_cfg(unsigned int irq)
 
 #endif
 
-#ifndef CONFIG_NUMA_MIGRATE_IRQ_DESC
-static inline void
-set_extra_move_desc(struct irq_desc *desc, const struct cpumask *mask)
-{
-}
-#endif
-
 struct io_apic {
 	unsigned int index;
 	unsigned int unused[3];
@@ -592,9 +569,6 @@ set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask)
 	if (assign_irq_vector(irq, cfg, mask))
 		return BAD_APICID;
 
-	/* check that before desc->addinity get updated */
-	set_extra_move_desc(desc, mask);
-
 	cpumask_copy(desc->affinity, mask);
 
 	return apic->cpu_mask_to_apicid_and(desc->affinity, cfg->domain);
@@ -2393,8 +2367,6 @@ migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask)
 	if (assign_irq_vector(irq, cfg, mask))
 		return;
 
-	set_extra_move_desc(desc, mask);
-
 	dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask);
 
 	irte.vector = cfg->vector;
@@ -2491,34 +2463,14 @@ static void irq_complete_move(struct irq_desc **descp)
 	struct irq_cfg *cfg = desc->chip_data;
 	unsigned vector, me;
 
-	if (likely(!cfg->move_in_progress)) {
-#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
-		if (likely(!cfg->move_desc_pending))
-			return;
-
-		/* domain has not changed, but affinity did */
-		me = smp_processor_id();
-		if (cpumask_test_cpu(me, desc->affinity)) {
-			*descp = desc = move_irq_desc(desc, me);
-			/* get the new one */
-			cfg = desc->chip_data;
-			cfg->move_desc_pending = 0;
-		}
-#endif
+	if (likely(!cfg->move_in_progress))
 		return;
-	}
 
 	vector = ~get_irq_regs()->orig_ax;
 	me = smp_processor_id();
 
-	if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) {
-#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
-		*descp = desc = move_irq_desc(desc, me);
-		/* get the new one */
-		cfg = desc->chip_data;
-#endif
+	if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain))
 		send_cleanup_vector(cfg);
-	}
 }
 #else
 static inline void irq_complete_move(struct irq_desc **descp) {}
diff --git a/include/linux/irq.h b/include/linux/irq.h
index c4953cf..2a34cd6 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -212,16 +212,6 @@ extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
 
 extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
 
-static inline struct irq_desc *
-irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)
-{
-#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
-	return irq_to_desc(irq);
-#else
-	return desc;
-#endif
-}
-
 /*
  * Migration helpers for obsolete names, they will go away:
  */
diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile
index 3394f8f..2f06527 100644
--- a/kernel/irq/Makefile
+++ b/kernel/irq/Makefile
@@ -3,5 +3,5 @@ obj-y := handle.o manage.o spurious.o resend.o chip.o devres.o
 obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o
-obj-$(CONFIG_NUMA_MIGRATE_IRQ_DESC) += numa_migrate.o
+obj-$(CONFIG_SPARSE_IRQ) += numa_migrate.o
 obj-$(CONFIG_PM_SLEEP) += pm.o
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c687ba4..13c68e7 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -359,7 +359,6 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
 
 	spin_lock(&desc->lock);
 	mask_ack_irq(desc, irq);
-	desc = irq_remap_to_desc(irq, desc);
 
 	if (unlikely(desc->status & IRQ_INPROGRESS))
 		goto out_unlock;
@@ -438,7 +437,6 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
 	desc->status &= ~IRQ_INPROGRESS;
 out:
 	desc->chip->eoi(irq);
-	desc = irq_remap_to_desc(irq, desc);
 
 	spin_unlock(&desc->lock);
 }
@@ -475,7 +473,6 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
 		    !desc->action)) {
 		desc->status |= (IRQ_PENDING | IRQ_MASKED);
 		mask_ack_irq(desc, irq);
-		desc = irq_remap_to_desc(irq, desc);
 		goto out_unlock;
 	}
 	kstat_incr_irqs_this_cpu(irq, desc);
@@ -483,7 +480,6 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
 	/* Start handling the irq */
 	if (desc->chip->ack)
 		desc->chip->ack(irq);
-	desc = irq_remap_to_desc(irq, desc);
 
 	/* Mark the IRQ currently in progress.*/
 	desc->status |= IRQ_INPROGRESS;
@@ -544,10 +540,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
 	if (!noirqdebug)
 		note_interrupt(irq, desc, action_ret);
 
-	if (desc->chip->eoi) {
+	if (desc->chip->eoi)
 		desc->chip->eoi(irq);
-		desc = irq_remap_to_desc(irq, desc);
-	}
 }
 
 void
@@ -582,10 +576,8 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 
 	/* Uninstall? */
 	if (handle == handle_bad_irq) {
-		if (desc->chip != &no_irq_chip) {
+		if (desc->chip != &no_irq_chip)
 			mask_ack_irq(desc, irq);
-			desc = irq_remap_to_desc(irq, desc);
-		}
 		desc->status |= IRQ_DISABLED;
 		desc->depth = 1;
 	}
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 882c798..3e0cbc4 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -458,11 +458,8 @@ unsigned int __do_IRQ(unsigned int irq)
 		/*
 		 * No locking required for CPU-local interrupts:
 		 */
-		if (desc->chip->ack) {
+		if (desc->chip->ack)
 			desc->chip->ack(irq);
-			/* get new one */
-			desc = irq_remap_to_desc(irq, desc);
-		}
 		if (likely(!(desc->status & IRQ_DISABLED))) {
 			action_ret = handle_IRQ_event(irq, desc->action);
 			if (!noirqdebug)
@@ -473,10 +470,8 @@ unsigned int __do_IRQ(unsigned int irq)
 	}
 
 	spin_lock(&desc->lock);
-	if (desc->chip->ack) {
+	if (desc->chip->ack)
 		desc->chip->ack(irq);
-		desc = irq_remap_to_desc(irq, desc);
-	}
 	/*
 	 * REPLAY is when Linux resends an IRQ that was dropped earlier
 	 * WAITING is used by probe to mark irqs that are being tested
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c
index 5760d72..ce72bc3 100644
--- a/kernel/irq/numa_migrate.c
+++ b/kernel/irq/numa_migrate.c
@@ -97,9 +97,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
 
 	/* free the old one */
 	free_one_irq_desc(old_desc, desc);
-	spin_unlock(&old_desc->lock);
 	kfree(old_desc);
-	spin_lock(&desc->lock);
 
 	return desc;
 

  reply	other threads:[~2009-05-01 17:08 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16  1:39 [PATCH 1/8] x86/irq: remove NUMA_MIGRATIE_IRQ_DESC Yinghai Lu
2009-04-16  1:40 ` [PATCH 2/8] irq: correct CPUMASKS_OFFSTACK typo -v3 Yinghai Lu
2009-04-16  1:41 ` [PATCH 3/8] irq: make set_affinity to return status -v2 Yinghai Lu
2009-04-16  9:08   ` Ingo Molnar
2009-04-16  9:17     ` Joe Perches
2009-04-16  9:25       ` Ingo Molnar
2009-04-16  1:41 ` [PATCH 4/8] irq: only update affinity in chip set_affinity() -v3 Yinghai Lu
2009-04-16 23:25   ` Suresh Siddha
2009-04-17  1:58     ` Yinghai Lu
2009-04-16  1:42 ` [PATCH 5/8] irq: change irq_desc_alloc to take node instead cpu Yinghai Lu
2009-04-16  9:10   ` Ingo Molnar
2009-04-16  1:43 ` [PATCH 6/8] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-04-16  9:16   ` Ingo Molnar
2009-04-16  1:44 ` [PATCH 7/8] x86/irq: make MSI irq_desc numa aware Yinghai Lu
2009-04-16  9:18   ` Ingo Molnar
2009-04-16  1:44 ` [PATCH 8/8] irq: make ht " Yinghai Lu
2009-04-16  9:21   ` Ingo Molnar
2009-04-16 23:34     ` Suresh Siddha
2009-04-16  9:03 ` [PATCH 1/8] x86/irq: remove NUMA_MIGRATIE_IRQ_DESC Ingo Molnar
2009-04-17  4:17   ` [PATCH 1/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC Yinghai Lu
2009-04-17  4:18     ` [PATCH 2/9] irq: correct CPUMASKS_OFFSTACK typo -v4 Yinghai Lu
2009-04-28  0:58       ` [PATCH 2/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC -v2 Yinghai Lu
2009-05-01 17:06         ` tip-bot for Yinghai Lu [this message]
2009-04-17  4:19     ` [PATCH 3/9] irq: make set_affinity to return status -v2 Yinghai Lu
2009-04-17  4:19       ` Yinghai Lu
2009-04-28  0:59       ` Yinghai Lu
2009-04-28  0:59         ` Yinghai Lu
2009-05-01 17:06         ` [tip:irq/numa] irq: change ->set_affinity() to return status tip-bot for Yinghai Lu
2009-05-06  6:55         ` [tip:irq/numa] irq: change ->set_affinity() to return status, fix tip-bot for Ingo Molnar
2009-04-17  4:20     ` [PATCH 4/9] irq: only update affinity if set_affinity() sucessfully -v4 Yinghai Lu
2009-04-28  0:59       ` Yinghai Lu
2009-05-01 17:07         ` [tip:irq/numa] irq: only update affinity if ->set_affinity() is sucessfull tip-bot for Yinghai Lu
2009-04-17  4:21     ` [PATCH 5/9] x86/irq: change irq_desc_alloc to take node instead cpu Yinghai Lu
2009-04-28  1:00       ` [PATCH 5/9] x86/irq: change irq_desc_alloc to take node instead cpu -v2 Yinghai Lu
2009-05-01 17:07         ` [tip:irq/numa] x86/irq: change irq_desc_alloc() to take node instead of cpu tip-bot for Yinghai Lu
2009-04-17  4:23     ` [PATCH 6/9] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-04-17  4:23       ` Yinghai Lu
2009-04-17  4:23       ` Yinghai Lu
2009-04-23  4:42       ` Len Brown
2009-04-23  4:42         ` Len Brown
2009-04-26 21:53         ` [PATCH] x86/acpi: remove compress irq trick for 32bit Yinghai Lu
2009-04-26 21:55           ` [PATCH] x86/acpi: calling mp_config_acpi_gsi in mp_register_gsi Yinghai Lu
2009-04-26 23:25             ` Yinghai Lu
2009-04-27  1:12             ` [PATCH] x86/acpi: calling mp_config_acpi_gsi in mp_register_gsi -v2 Yinghai Lu
2009-04-27  3:30           ` [PATCH] x86/acpi: remove compress irq trick for 32bit Ingo Molnar
2009-05-14 15:41           ` Len Brown
2009-05-15 13:06             ` Ingo Molnar
2009-04-28  1:01       ` [PATCH 6/9] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-04-28  1:01         ` Yinghai Lu
2009-04-28  1:01         ` Yinghai Lu
2009-05-01 17:07         ` [tip:irq/numa] irq: change ACPI GSI APIs to also take a device argument tip-bot for Yinghai Lu
2009-04-17  4:24     ` [PATCH 7/9] irq: make io_apic_set_pci_routing to use device Yinghai Lu
2009-04-28  1:01       ` Yinghai Lu
2009-05-01 17:07         ` [tip:irq/numa] irq: change io_apic_set_pci_routing() to use device parameter tip-bot for Yinghai Lu
2009-04-17  4:25     ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware Yinghai Lu
2009-04-27  3:26       ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware -v2 Yinghai Lu
2009-04-28  1:02       ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware -v3 Yinghai Lu
2009-04-28 10:14         ` Ingo Molnar
2009-04-28 14:17           ` Yinghai Lu
2009-04-28 14:32             ` Ingo Molnar
2009-04-28 19:07               ` Yinghai Lu
2009-04-29 12:00                 ` Ingo Molnar
2009-04-29 16:27                   ` [PATCH] x86/irq: using move_irq_desc Yinghai Lu
2009-04-29 20:41                     ` Ingo Molnar
2009-04-29 21:23                       ` Ingo Molnar
2009-04-29 21:55                         ` Yinghai Lu
2009-04-29 23:25                         ` Yinghai Lu
2009-04-30  7:29                           ` Ingo Molnar
2009-04-30  8:17                             ` [PATCH] x86/irq: using move_irq_desc -v3 Yinghai Lu
2009-05-01 17:08                               ` [tip:irq/numa] x86/irq: use move_irq_desc() in create_irq_nr() tip-bot for Yinghai Lu
2009-04-28 21:41               ` [PATCH] x86/irq: use move_irq_desc only when CONFIG_NUMA_IRQ_DESC is set Yinghai Lu
2009-05-01 17:07         ` [tip:irq/numa] x86/irq: change MSI irq_desc to be more numa aware tip-bot for Yinghai Lu
2009-04-17  4:25     ` [PATCH 9/9] irq: make ht irq_desc " Yinghai Lu
2009-04-28  1:02       ` Yinghai Lu
2009-04-28 10:19         ` Ingo Molnar
2009-04-28 16:28           ` Jesse Barnes
2009-04-28 16:28           ` Jesse Barnes
2009-05-01 17:07         ` [tip:irq/numa] irq: make ht irq_desc more " tip-bot for Yinghai Lu
2009-04-17 13:49     ` [PATCH 1/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC Ingo Molnar
2009-04-28  0:57     ` [PATCH 1/9] irq: correct CPUMASKS_OFFSTACK typo -v5 Yinghai Lu
2009-05-01 17:06       ` [tip:irq/numa] irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout tip-bot for Yinghai Lu
2009-04-17  1:00 ` [tip:irq/urgent] x86/irq: mark NUMA_MIGRATIE_IRQ_DESC broken tip-bot for Yinghai Lu
2009-04-17  1:21 ` [tip:irq/urgent] x86/irq: mark NUMA_MIGRATE_IRQ_DESC broken tip-bot for Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-fcef5911c7ea89b80d5bfc727f402f37c9eefd57@git.kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.