Re: [PATCH 00/16] dyn_array and nr_irqs support v2

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: H. Peter Anvin <hpa@...>
Cc: Yinghai Lu <yhlu.kernel@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, Dhaval Giani <dhaval@...>, Mike Travis <travis@...>, Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Saturday, August 2, 2008 - 4:20 pm

"H. Peter Anvin" <hpa@zytor.com> writes:


With respect to space we have shown: We create many more irq_desc
entries then we use in practice.  Which hurts us when it comes to
pace.  Especially when compiling a single kernel for a wide range
of machines.

Which is why I ultimately want a list or a tree data structure holding
irq_desc entries instead of an array.  Arrays must be statically
oversized sized, waisting space and reducing our flexibility of
dealing with irqs at run time.

Which says to me the low level architecture code that actually knows
at run time how many irqs there are should do the allocation of
irq_desc entries and allocating them on the appropriate NUMA node.

All of which should yield no fixed cap short of 32 bits for the irq
number at run time.  Not having an arbitrarily low cap is what I mean
by having the option of a sparsely allocated irq number. If we have a
nice data structure that is a side effect that comes essentially for
free.

Except for upgrading the genirq code to pass things internally and to
the arch code in terms of irq_desc * entries.  This should be very little
change from where we are today.


Yes.  There are those kinds of issues.  I don't think I have yet come up with
a usable stable mapping for msi interrupts.  Just something close.

I expect what is most likely to work is after allocating the fixed irqs, to scan the
pci busses and for each for each pci device if msi is supported reserve 1 irq number.
If msi-X is supported reserve 4096 irq numbers.  If ht-irqs are supported reserve
1 irq for each irq number.  Hot plug slots that can ultimately have pci busses
plugged into them are going to be interesting.  But I think if we make an
effort msi irq numbers will stop flapping in the breeze and are likely to
remain the same, and fit in the number of bits we have.  While still not
requiring us to allocate storage for them.  Potentially we can even treat
GSIs the same way.  If we know that an ioapic line is simply not connected
we can reserve an irq number for it at boot but never allocate an irq_desc
structure for it.

What I mean by having the option to do a stable mapping is that we don't build
in unnecessary a priori limits to the maximum irq number.  Irq numbers have
always been sparsely allocated.  It was a rare ISA system that used all 16
of it's irqs.  It was an even rarer ioapic based system that used all of it's ioapic
inputs but we have always reserved irq numbers for all of those potential irqs.

So I ask to have a data structure that can potentially span the entire 32bit
range of irq numbers, and that instead of a dense and sparsely used array
we keep just the irq_desc entries that we need.

The only compile time options would be:  Has this architecture switched over
to a sparse irq array data structure.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 5:37 am)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Fri Aug 1, 4:46 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 10:58 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Mike Travis, (Fri Aug 1, 5:47 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 5:30 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Fri Aug 1, 6:38 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 9:09 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Fri Aug 1, 9:41 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Mike Travis, (Mon Aug 4, 8:57 am)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Mon Aug 4, 10:38 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Mon Aug 4, 11:40 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Mon Aug 4, 11:48 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 10:01 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Fri Aug 1, 10:03 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Fri Aug 1, 10:39 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Fri Aug 1, 11:28 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Sat Aug 2, 12:42 am)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Sat Aug 2, 11:41 am)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Sat Aug 2, 4:20 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, H. Peter Anvin, (Fri Aug 1, 9:36 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 6:10 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Yinghai Lu, (Fri Aug 1, 5:57 pm)
Re: [PATCH 00/16] dyn_array and nr_irqs support v2, Eric W. Biederman, (Fri Aug 1, 6:45 pm)
[PATCH 01/16] x86: 64bit support more than 256 irq, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 02/16] x86: introduce nr_irqs for 64bit v3, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 03/16] add dyn_array support, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 04/16] make irq_timer_state to use dyn_array, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 05/16] make irq2_iommu to use dyn_array, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 06/16] make irq_desc to use dyn_array, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 07/16] x86: make 64bit support dyn_array, Yinghai Lu, (Fri Aug 1, 5:37 am)
[PATCH 09/16] add per_cpu_dyn_array support, Yinghai Lu, (Fri Aug 1, 5:37 am)