[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411743478-31435-29-git-send-email-jiang.liu@linux.intel.com>
Date: Fri, 26 Sep 2014 22:57:58 +0800
From: Jiang Liu <jiang.liu@...ux.intel.com>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Randy Dunlap <rdunlap@...radead.org>,
Yinghai Lu <yinghai@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Grant Likely <grant.likely@...aro.org>
Cc: Jiang Liu <jiang.liu@...ux.intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Tony Luck <tony.luck@...el.com>,
Joerg Roedel <joro@...tes.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
x86@...nel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
Daniel J Blueman <daniel@...ascale.com>
Subject: [RFC v1 28/28] x86, irq: Add kernel parameter vector_alloc to set CPU vector allocation policy
Parameter vector_alloc should be set to an integer with:
bit 0: enable allocating CPU vector from CPUs on device local node.
That's to allocate from cpumask_of_node(irq_data->node).
bit 1: enable the default policy, which is to allocate from
apic->target_cpus().
When allocating vectors, it tries all enabled policies from lower bit
position to higher bit position.
This option could be use to optimize interrupt distribution on large
system such as NumaChip etc.
Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Daniel J Blueman <daniel@...ascale.com>
---
Documentation/kernel-parameters.txt | 6 ++++++
arch/x86/kernel/apic/vector.c | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 10d51c2f10d7..895ba404eb0d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3586,6 +3586,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
vector= [IA-64,SMP]
vector=percpu: enable percpu vector domain
+ vector_alloc= [x86,SMP]
+ vector_alloc=policy: policy is a bitmap, bit 0
+ for allocating CPU vector from CPUs on device local
+ node; bit 1 for the default policy to allocating from
+ apic->target_cpus(). All higher bits are reserved.
+
video= [FB] Frame buffer configuration
See Documentation/fb/modedb.txt.
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 4a16e0a5ae0f..d1f616374ec0 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -65,6 +65,17 @@ void set_vector_alloc_policy(unsigned int policy)
x86_vector_alloc_policy = policy | X86_VECTOR_POL_CALLER;
}
+static int __init apic_parse_vector_policy(char *str)
+{
+ int policy;
+
+ if (get_option(&str, &policy) == 1)
+ set_vector_alloc_policy(policy);
+
+ return 1;
+}
+__setup("vector_alloc=", apic_parse_vector_policy);
+
static struct irq_cfg *alloc_irq_cfg(int node)
{
struct irq_cfg *cfg;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists