mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: MaJun <majun258@huawei.com>
To: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <marc.zyngier@arm.com>,
	<tglx@linutronix.de>, <lizefan@huawei.com>, <huxinwei@huawei.com>,
	<dingtianhong@huawei.com>, <guohanjun@huawei.com>,
	<majun258@huawei.com>, <wuyun.wu@huawei.com>,
	<yangyingliang@huawei.com>
Subject: [RFC PATCH] genirq: Change the non-balanced irq to balance irq when the cpu of the irq bounded off line
Date: Fri, 1 Apr 2016 11:28:11 +0800	[thread overview]
Message-ID: <1459481291-10136-1-git-send-email-majun258@huawei.com> (raw)

From: Ma Jun <majun258@huawei.com>

When the CPU of a non-balanced irq bounded is off line, the irq will be migrated to other CPUs,
usually the first cpu on-line.

We can suppose the situation if a system has more than one non-balanced irq.
At extreme case, these irqs will be migrated to the same CPU and will cause the 
CPU run with high irq pressure, even make the system die.

So, I think maybe we need to change the non-balanced irq to a irq can be
balanced to avoid the problem descried above.

Maybe this is not a good solution for this problem, please offer me some
suggestion if you have a better one.

Signed-off-by: Ma Jun <majun258@huawei.com>
---
 kernel/irq/cpuhotplug.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c
index 011f8c4..80d54a5 100644
--- a/kernel/irq/cpuhotplug.c
+++ b/kernel/irq/cpuhotplug.c
@@ -30,6 +30,8 @@ static bool migrate_one_irq(struct irq_desc *desc)
 		return false;
 
 	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
+		if (irq_settings_has_no_balance_set(desc))
+			irqd_clear(d, IRQD_NO_BALANCING);
 		affinity = cpu_online_mask;
 		ret = true;
 	}
-- 
1.7.1

             reply	other threads:[~2016-04-01  3:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  3:28 MaJun [this message]
2016-04-01  8:30 ` Marc Zyngier

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=1459481291-10136-1-git-send-email-majun258@huawei.com \
    --to=majun258@huawei.com \
    --cc=dingtianhong@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=huxinwei@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --cc=wuyun.wu@huawei.com \
    --cc=yangyingliang@huawei.com \
    /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

all inboxes | Powered by JetHome®