From: Jiang Liu <jiang.liu@linux.intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Randy Dunlap <rdunlap@infradead.org>,
Yinghai Lu <yinghai@kernel.org>, Borislav Petkov <bp@alien8.de>,
Jonathan Corbet <corbet@lwn.net>,
"x86@kernel.org" <x86@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Tony Luck <tony.luck@intel.com>, Joerg Roedel <joro@8bytes.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
Daniel J Blueman <daniel@numascale.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [Patch Part3 v4 38/38] x86, irq: Add kernel parameter vector_alloc to set CPU vector allocation policy
Date: Tue, 02 Dec 2014 07:45:23 +0800 [thread overview]
Message-ID: <547CFD93.5000702@linux.intel.com> (raw)
In-Reply-To: <CAErSpo7-GezRLKe4hTAm=KhYHUw6zggi+4LRXjh25K-f+_hAng@mail.gmail.com>
On 2014/12/2 2:49, Bjorn Helgaas wrote:
> On Tue, Nov 25, 2014 at 12:50 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:
>> 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.
>
> Why can't we figure this out automatically? Having a kernel parameter
> is a pain in the neck for users.
Hi Bjorn,
I'm thinking of automatically turning on local vector
allocation if any host bridge has an assigned(valid) NUMA node id.
By this way, user doesn't need to specify the kernel parameter for most
cases. How about this solution?
Thanks!
Gerry
>
>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>> Cc: Daniel J Blueman <daniel@numascale.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 4c81a860cc2b..a175c5016954 100644
>> --- a/Documentation/kernel-parameters.txt
>> +++ b/Documentation/kernel-parameters.txt
>> @@ -3709,6 +3709,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 16de8906ee1e..1158843551c7 100644
>> --- a/arch/x86/kernel/apic/vector.c
>> +++ b/arch/x86/kernel/apic/vector.c
>> @@ -79,6 +79,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 apic_chip_data *alloc_apic_chip_data(int node)
>> {
>> struct apic_chip_data *data;
>> --
>> 1.7.10.4
>>
next prev parent reply other threads:[~2014-12-01 23:45 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 7:49 [Patch Part3 v4 00/38] Enable hierarchy irqdomian on x86 platforms Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 01/38] x86, intel-mid: Delay initialization of APB timer Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 02/38] x86, intel-mid, trivial: Refine code syntax for sfi_parse_mtmr() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 03/38] x86, irq: Kill unused pre_init_apic_IRQ0() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 04/38] x86, irq: Prepare IOAPIC interfaces to support hierarchy irqdomain Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 05/38] x86, irq: Implement callbacks to enable hierarchy irqdomain on IOAPICs Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 06/38] x86, irq: Refine the way to allocate irq_cfg for legacy IRQs Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 07/38] x86, irq: Simplify the way to print IOAPIC entry Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 08/38] x86, irq: Introduce helper functions to support hierarchy irqdomain for IOAPIC Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 09/38] x86, irq: Convert IOAPIC to use hierarchy irqdomain interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 10/38] x86, irq: Kill unused old IOAPIC " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 11/38] x86, irq: Kill unused struct mp_pin_info Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 12/38] x86, irq: Kill x86_io_apic_ops.print_entries and related interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 13/38] x86, irq: Kill x86_io_apic_ops.setup_entry " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 14/38] x86, irq: Kill x86_io_apic_ops.set_affinity " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 15/38] x86, irq: Kill x86_io_apic_ops.eoi_ioapic_pin " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 16/38] x86, irq: Kill GENERIC_IRQ_LEGACY_ALLOC_HWIRQ Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 17/38] x86: Clean up unused forward declarations in x86_init.h Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 18/38] x86: irq_remapping: Clean up unsued code Jiang Liu
2014-12-02 0:21 ` Bjorn Helgaas
2014-11-25 7:49 ` [Patch Part3 v4 19/38] iommu/vt-d: " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 20/38] iommu/amd: " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 21/38] x86: irq_remapping: Clean up unused interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 22/38] x86, irq: Kill irq_cfg.irq_remapped Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 23/38] iommu/vt-d: Move struct irq_2_iommu into intel_irq_remapping.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 24/38] iommu/amd: Move struct irq_2_irte into amd_iommu.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 25/38] x86, irq: Move irq_cfg.irq_2_pin into io_apic.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 26/38] x86, irq: Kill struct io_apic_irq_attr Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 27/38] x86, irq: Kill x86_io_apic_ops.write and x86_io_apic_ops.modify Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 28/38] x86, irq: Clean up io_apic.h Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 29/38] x86, irq: Use cached IOAPIC entry instead of reading from hardware Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 30/38] x86, irq: Kill unused alloc_irq_and_cfg_at() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 31/38] x86, irq: Change functions only used in vector.c as static Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 32/38] x86, irq: Kill function apic_set_affinity() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 33/38] x86, irq: Move check of cfg->move_in_progress into send_cleanup_vector() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 34/38] x86, irq: Move private data in struct irq_cfg into dedicated data structure Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 35/38] x86, irq: Refine the way to calculate NR_IRQS Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 36/38] ACPI, irq, x86: Kill private function mp_register_gsi()/ mp_unregister_gsi() Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 37/38] x86, irq: Introduce mechanism to support different vector allocation policies Jiang Liu
2014-11-27 10:44 ` Thomas Gleixner
2014-11-27 16:22 ` Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 38/38] x86, irq: Add kernel parameter vector_alloc to set CPU vector allocation policy Jiang Liu
2014-12-01 18:49 ` Bjorn Helgaas
2014-12-01 19:15 ` Daniel J Blueman
2014-12-01 23:45 ` Jiang Liu [this message]
2014-12-01 23:47 ` Bjorn Helgaas
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=547CFD93.5000702@linux.intel.com \
--to=jiang.liu@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel@numascale.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yinghai@kernel.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).