linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: torvalds@linux-foundation.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, John <jw@nuclearfallout.net>,
	Ingo Molnar <mingo@kernel.org>
Subject: [PATCH] irq: revert non-working patch to affinity defaults
Date: Thu, 02 Apr 2015 17:50:22 -0700	[thread overview]
Message-ID: <20150403005022.3143.73693.stgit@jbrandeb-cp2.jf.intel.com> (raw)

I've seen a couple of reports of issues since commit e2e64a932556 ("genirq:
Set initial affinity in irq_set_affinity_hint()") where the
affinity for the interrupt when programmed via
/proc/irq/<nnn>/smp_affinity will not be able to stick.  It changes back
to some previous value at the next interrupt on that IRQ.

The original intent was to fix the broken default behavior of all IRQs
for a device starting up on CPU0.  With a network card with 64 or more
queues, all 64 queue's interrupt vectors end up on CPU0 which can have
bad side effects, and has to be fixed by the irqbalance daemon, or by
the user at every boot with some kind of affinity script.

The symptom is that after a driver calls set_irq_affinity_hint, the
affinity will be set for that interrupt (and readable via /proc/...),
but on the first irq for that vector, the affinity for CPU0 or CPU1
resets to the default.  The rest of the irq affinites seem to work and
everything is fine.

Impact if we don't fix this for 4.0.0:
	Some users won't be able to set irq affinity as expected, on
	some cpus.

I've spent a chunk of time trying to debug this with no luck and suggest
that we revert the change if no-one else can help me debug what is going
wrong, we can pick up the change later.

This commit would also revert commit 4fe7ffb7e17ca ("genirq: Fix null pointer
reference in irq_set_affinity_hint()") which was a bug fix to the original
patch.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: John <jw@nuclearfallout.net>
---
 kernel/irq/manage.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 886d09e..c166a16 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -243,9 +243,6 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
 		return -EINVAL;
 	desc->affinity_hint = m;
 	irq_put_desc_unlock(desc, flags);
-	/* set the initial affinity to prevent every interrupt being on CPU0 */
-	if (m)
-		__irq_set_affinity(irq, m, false);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(irq_set_affinity_hint);


             reply	other threads:[~2015-04-03  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03  0:50 Jesse Brandeburg [this message]
2015-04-03  6:55 ` [PATCH] irq: revert non-working patch to affinity defaults Ingo Molnar
2015-04-04  0:13   ` Jesse Brandeburg
2015-04-04  9:34     ` Ingo Molnar
2015-04-04  9:51       ` John

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=20150403005022.3143.73693.stgit@jbrandeb-cp2.jf.intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=jw@nuclearfallout.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).