public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Yinghai Lu <yinghai@kernel.org>,
	mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com,
	linux-kernel@vger.kernel.org, travis@sgi.com
Subject: Re: [PATCH] sparse_irq aka dyn_irq v13
Date: Mon, 17 Nov 2008 07:58:57 +1100	[thread overview]
Message-ID: <1226869137.7178.175.camel@pasglop> (raw)
In-Reply-To: <20081113131850.d94fb229.akpm@linux-foundation.org>


> Other architectures want (or have) sparse interrupts.  Are those guys
> paying attention here?
> 
> I don't have a clue what all this does.  I hope those who will work on
> this code are sufficiently familiar with it all to be able to maintain
> it when there are close to zero comments in some of our most tricky and
> problem-prone code.

Indeed, I'm a bit scared by the patch as it is ...

On powerpc, we have a nice an simple virtual irq layer that also
probably better fits the need of architecture that can have multiple
PICs with different number space cascaded in various ways in a single
machine too.

We provide a basic construct that defines an HW IRQ domain (we call it
irq_host, it can have a 1:1 relationship to a HW irq_chip but not
always), and when HW IRQs are discovered and made available to linux,
they are "mapped" to virtual irq numbers by mapping them to a tuple
(irq_hose, hw_number).

The HW numbering can be arbitrarily anything for that controller
unrelated to the "linux" virtual number, so all the problems of making
IRQ 0 invalid and reserving 1...15 for legacy 8259 etc... are taken care
of.

For fast mapping of HW->Linux numbers, we provide various schemes that a
given IRQ host implementation can choose (from no translation, some HW
PICs or hypervisor can be directly given the linux number and pass it
back to us) to linear mapping to a lockless radix tree for large sparse
irq domains.

At this stage, I don't feel like changing to this sparse_irq which I
haven't fully understood, is complicated, and doesn't seem to provide
the features I need anyway.

The only thing that I see possibly of interest is getting rid of the
irq_desc array itself, toward something more dynamically resizeable, in
which case our powerpc remapping scheme could probably also benefit by
also getting rid in a similar way of our equivalent array used for
mapping the virq's to host,hw_number tuples.

The irq_desc per-cpu also seem to be an interesting idea.

In any case, the patch is too big and unless I missed something, totally
under-documented in what it does, why it does it, how it does it, etc...
with a bit more of that, I might take more time to look closely and find
out that indeed it's something I can make use of, maybe with a few
tweaks.

Cheers,
Ben.


  parent reply	other threads:[~2008-11-16 21:00 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081023143721.GA25783@elte.hu>
     [not found] ` <49012399.4010100@kernel.org>
     [not found]   ` <20081027164135.GD19476@elte.hu>
     [not found]     ` <4912B2FE.7030804@kernel.org>
     [not found]       ` <20081106101715.GA4022@elte.hu>
     [not found]         ` <4913B45C.1000009@kernel.org>
     [not found]           ` <20081107081249.GB4435@elte.hu>
     [not found]             ` <4913F9AA.80500@kernel.org>
     [not found]               ` <20081107084240.GG4435@elte.hu>
     [not found]                 ` <491434FB.2050904@kernel.org>
     [not found]                   ` <20081107124957.GA21709@elte.hu>
2008-11-09  7:05                     ` [RFC PATCH] sparse_irq aka dyn_irq Yinghai Lu
2008-11-09  7:38                       ` Ingo Molnar
2008-11-09  8:03                         ` Yinghai Lu
2008-11-10  9:40                           ` Ingo Molnar
2008-11-10  9:51                             ` [PATCH] sparse_irq aka dyn_irq v10 Yinghai Lu
2008-11-10  9:53                               ` Ingo Molnar
2008-11-10  9:55                                 ` Yinghai Lu
2008-11-10  9:57                                   ` Ingo Molnar
2008-11-10  9:55                             ` [RFC PATCH] sparse_irq aka dyn_irq Andrew Morton
2008-11-10 10:00                               ` Yinghai Lu
2008-11-10 10:03                                 ` Ingo Molnar
2008-11-10 10:05                                   ` Yinghai Lu
2008-11-10 10:09                                     ` Ingo Molnar
2008-11-10 19:47                                       ` Yinghai Lu
2008-11-11  6:28                                   ` [PATCH] sparse_irq aka dyn_irq v11 Yinghai Lu
     [not found]                                   ` <491A9F87.8040403@kernel.org>
     [not found]                                     ` <20081112120814.GG11352@elte.hu>
2008-11-13  7:01                                       ` [PATCH] sparse_irq aka dyn_irq v13 Yinghai Lu
2008-11-13  9:53                                         ` Ingo Molnar
2008-11-13 20:06                                           ` Yinghai Lu
2008-11-13 20:16                                       ` Yinghai Lu
2008-11-13 21:18                                         ` Andrew Morton
2008-11-13 21:21                                           ` Ingo Molnar
2008-11-13 22:01                                           ` Yinghai Lu
2008-11-13 22:05                                             ` Ingo Molnar
2008-11-13 22:13                                             ` Andrew Morton
2008-11-13 22:41                                               ` Yinghai Lu
2008-11-13 22:58                                                 ` Andrew Morton
2008-11-13 23:15                                                   ` Mike Travis
2008-11-13 23:24                                                     ` Yinghai Lu
2008-11-14  0:20                                                       ` Mike Travis
2008-11-14  0:29                                                         ` Yinghai Lu
2008-11-14  6:29                                                   ` [PATCH] sparse_irq aka dyn_irq v14 Yinghai Lu
2008-11-14  6:46                                                     ` Andrew Morton
2008-11-15  9:05                                                       ` Yinghai Lu
2008-11-13 22:19                                           ` [PATCH] sparse_irq aka dyn_irq v13 Paul Mackerras
2008-11-13 22:23                                             ` David Miller
2008-11-13 23:11                                               ` Mike Travis
2008-11-13 23:14                                                 ` David Miller
2008-11-14  0:15                                                   ` Mike Travis
2008-11-14  0:21                                                     ` David Miller
2008-11-14  0:39                                                       ` Mike Travis
2008-11-14  2:37                                                         ` David Miller
2008-11-14  3:06                                                           ` Mike Travis
2008-11-16 20:58                                           ` Benjamin Herrenschmidt [this message]
2008-11-16 23:44                                             ` Yinghai Lu
2008-11-16 23:48                                               ` H. Peter Anvin
2008-11-16 23:54                                                 ` Yinghai Lu
2008-11-16 23:59                                                   ` H. Peter Anvin
2008-11-17  0:21                                                     ` Yinghai Lu
2008-11-17  0:26                                                       ` H. Peter Anvin
2008-11-17  0:36                                                         ` Yinghai Lu
2008-11-17  0:48                                                           ` H. Peter Anvin
2008-11-17  0:58                                                             ` Yinghai Lu
2008-11-17  1:00                                                               ` H. Peter Anvin
2008-11-17  2:03                                                                 ` Mike Travis
2008-11-17  4:27                                                                 ` Benjamin Herrenschmidt
2008-11-17  4:26                                                         ` Benjamin Herrenschmidt
2008-11-17 20:25                                                       ` Jeremy Fitzhardinge
2008-11-17  4:25                                                     ` Benjamin Herrenschmidt
2008-11-17  4:22                                                   ` Benjamin Herrenschmidt
2008-11-17  1:51                                                 ` Mike Travis
2008-11-17  4:39                                                   ` H. Peter Anvin
2008-11-17  4:22                                                 ` Benjamin Herrenschmidt
2008-11-17  4:42                                                   ` H. Peter Anvin
2008-11-17  6:52                                                     ` Benjamin Herrenschmidt
2008-11-09  8:36                         ` [RFC PATCH] sparse_irq aka dyn_irq H. Peter Anvin
2008-11-09  7:50                       ` Cyrill Gorcunov

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=1226869137.7178.175.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.com \
    --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