mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>, hpa <hpa@zytor.com>,
	"Dhaval Giani" <dhaval@linux.vnet.ibm.com>,
	"Mike Travis" <travis@sgi.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/16] dyn_array and nr_irqs support v2
Date: Fri, 1 Aug 2008 14:30:55 -0700	[thread overview]
Message-ID: <86802c440808011430i6cf5cb8cn519777a78dd987b0@mail.gmail.com> (raw)
In-Reply-To: <m1iqukwjjg.fsf@frodo.ebiederm.org>

On Fri, Aug 1, 2008 at 1:46 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
> Yinghai Lu <yhlu.kernel@gmail.com> writes:
>
>> Please check dyn_array support for x86
>
> YH you have not addressed any of my core concerns and this exceeds my review limit.

i mean drivers/serial/8250.c

> Unfortunately I don't feel like this is a productive process.
>
> My core concerns are:
> - You have not separated out and separately pushed the regression patch.  So that we can
>  fix the current rc release.  Simply tuning NR_IRQS is all I feel comfortable with for
>  fixing things in the post merge window period.

Increase NR_IRQS to 512 for x86_64?

>
> - The generic code has no business with dealing with NR_IRQS sized arrays.
>  Since we don't have a generic problem I don't see why we should have a generic dyn_array solution.
besides

arch/x86/kernel/io_apic_32.c:DEFINE_DYN_ARRAY(irq_2_pin, sizeof(struct
irq_pin_list), pin_map_size, 16, NULL);
arch/x86/kernel/io_apic_32.c:DEFINE_DYN_ARRAY(balance_irq_affinity,
sizeof(struct balance_irq_affinity), nr_irqs, PAGE_SIZE,
irq_affinity_init_work);
arch/x86/kernel/io_apic_32.c:DEFINE_DYN_ARRAY(irq_vector, sizeof(u8),
nr_irqs, PAGE_SIZE, irq_vector_init_work);
arch/x86/kernel/io_apic_64.c:DEFINE_DYN_ARRAY(irq_cfg, sizeof(struct
irq_cfg), nr_irqs, PAGE_SIZE, init_work);
arch/x86/kernel/io_apic_64.c:DEFINE_DYN_ARRAY(irq_2_pin, sizeof(struct
irq_pin_list), pin_map_size, sizeof(struct irq_pin_list), NULL);

kernel/sched.c:DEFINE_PER_CPU_DYN_ARRAY_ADDR(per_cpu__kstat_irqs,
per_cpu__kstat.irqs, sizeof(unsigned int), nr_irqs, sizeof(unsigned
long), NULL);

and kstat.irqs is the killer... every cpu will have that. [NR_CPUS][NR_IRQS]...

>
> - The dyn_array infrastructure does not provide for per numa node allocation of
>  irq_desc structures, limiting NUMA scalability.

you plan to move irq_desc when irq_affinity is set to cpus on other node?

something like DEFINE_PER_NODE_DYN_ARRAY ?

>
> - You appear to be papering over problems instead of digging in and actually fixing them.

use dyn_array is less intrusive at this point. and dyn_array related
code is not big.
just NR_IRQS to nr_irqs to make the patches more bigger. actually it is simple.

with acpi_madt probing, nr_irqs is much small. like 48 or 98. and
current one is MACRO 224 or 256.

>
> YH  Here is what I was suggesting when the topic of killing NR_IRQs came up a week or so
> ago.
> http://lkml.org/lkml/2008/7/10/439
> http://lkml.org/lkml/2008/7/10/532
>
> Which essentially boils down to:
> - Removing NR_IRQS from the non-irq infrastructure code.
> - Add a config option for architectures that are not going to use an array
> - In the genirq code have a lookup function that goes from irq number to irq_desc *.

so we need one pointer array with that lookup function? what is the
pointer array index size?
or use list in that lookup function?

how about percpu kstat.irqs?

>
> The rest we should be able to handle in a arch dependent fashion.
>
> When we are done we should be able to create a stable irq number for msi interrupts
> that is something like:  bus:dev:fun:vector_no which is 8+5+3+12=28 bits long.

how about irq migration from one cpu to another with different vector_no ?

YH

  reply	other threads:[~2008-08-01 21:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01  9:37 Yinghai Lu
2008-08-01  9:37 ` [PATCH 01/16] x86: 64bit support more than 256 irq Yinghai Lu
2008-08-01  9:37   ` [PATCH 02/16] x86: introduce nr_irqs for 64bit v3 Yinghai Lu
2008-08-01  9:37     ` [PATCH 03/16] add dyn_array support Yinghai Lu
2008-08-01  9:37       ` [PATCH 04/16] make irq_timer_state to use dyn_array Yinghai Lu
2008-08-01  9:37         ` [PATCH 05/16] make irq2_iommu " Yinghai Lu
2008-08-01  9:37           ` [PATCH 06/16] make irq_desc " Yinghai Lu
2008-08-01  9:37             ` [PATCH 07/16] x86: make 64bit support dyn_array Yinghai Lu
2008-08-01  9:37               ` [PATCH 08/16] serial: change remove NR_IRQS in 8250.c v2 Yinghai Lu
2008-08-01  9:37                 ` [PATCH 09/16] add per_cpu_dyn_array support Yinghai Lu
2008-08-01  9:37                   ` [PATCH 10/16] irq: make irqs in kernel stat use per_cpu_dyn_array Yinghai Lu
2008-08-01  9:37                     ` [PATCH 11/16] x86 remove irq_vectors_limit.h Yinghai Lu
2008-08-01  9:37                       ` [PATCH 12/16] x86: make 32bit use dyn_array Yinghai Lu
2008-08-01  9:37                         ` [PATCH 13/16] add per_cpu_dyn_array for arch percpu support Yinghai Lu
2008-08-01  9:37                           ` [PATCH 14/16] x86: get mp_irqs from madt Yinghai Lu
2008-08-01  9:37                             ` [PATCH 15/16] x86: make 32bit more like with io_apic/dyn_array to 64 bit Yinghai Lu
2008-08-01  9:37                               ` [PATCH 16/16] x86: alloc dyn_array all alltogether Yinghai Lu
2008-08-01 20:46 ` [PATCH 00/16] dyn_array and nr_irqs support v2 Eric W. Biederman
2008-08-01 21:30   ` Yinghai Lu [this message]
2008-08-01 21:57     ` Yinghai Lu
2008-08-01 22:45       ` Eric W. Biederman
2008-08-01 22:10     ` Yinghai Lu
2008-08-01 22:38     ` Eric W. Biederman
2008-08-02  1:09       ` Yinghai Lu
2008-08-02  1:36         ` H. Peter Anvin
2008-08-02  1:41         ` Eric W. Biederman
2008-08-02  2:01           ` Yinghai Lu
2008-08-02  2:03             ` H. Peter Anvin
2008-08-02  2:39               ` Eric W. Biederman
2008-08-02  3:28                 ` H. Peter Anvin
2008-08-02  4:42                   ` Eric W. Biederman
2008-08-02 15:41                     ` H. Peter Anvin
2008-08-02 20:20                       ` Eric W. Biederman
2008-08-04 12:57           ` Mike Travis
2008-08-05  2:38             ` H. Peter Anvin
2008-08-05  3:40               ` Eric W. Biederman
2008-08-05  3:48                 ` H. Peter Anvin
2008-08-01 21:47   ` Mike Travis
2008-08-02  2:58   ` 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=86802c440808011430i6cf5cb8cn519777a78dd987b0@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.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®