From: Sebastien Dugue <sebastien.dugue@bull•net>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Tim Chavez <tinytim@us•ibm.com>,
Linux RT Users <linux-rt-users@vger•kernel.org>,
Jean Pierre Dion <jean-pierre.dion@bull•net>,
linux-kernel <linux-kernel@vger•kernel.org>,
linux-ppc <linuxppc-dev@ozlabs•org>,
Paul Mackerras <paulus@samba•org>,
Gilles Carry <Gilles.Carry@ext•bull.net>
Subject: Re: [PATCH 0/2][RT] powerpc - fix bug in irq reverse mapping radix tree
Date: Thu, 24 Jul 2008 13:08:07 +0200 [thread overview]
Message-ID: <20080724130807.23d5252b@bull.net> (raw)
In-Reply-To: <1216851458.11027.346.camel@pasglop>
On Thu, 24 Jul 2008 08:17:38 +1000 Benjamin Herrenschmidt <benh@kernel•crashing.org> wrote:
>
> > The root cause of this bug lies in the fact that the XICS interrupt controller
> > uses a radix tree for its reverse irq mapping and that we cannot allocate the tree
> > nodes (even GFP_ATOMIC) with preemption disabled.
>
> Is that yet another caes of -rt changing some basic kernel semantics ?
Ahem, not really new: http://lkml.org/lkml/2007/11/12/211
>
> > In fact, we have 2 nested preemption disabling when we want to allocate
> > a new node:
> >
> > - setup_irq() does a spin_lock_irqsave() before calling xics_startup() which
> > then calls irq_radix_revmap() to insert a new node in the tree
> >
> > - irq_radix_revmap() also does a spin_lock_irqsave() (in irq_radix_wrlock())
> > before the radix_tree_insert()
> >
> > The first patch moves the call to irq_radix_revmap() from xics_startup() out to
> > xics_host_map_direct() and xics_host_map_lpar() which are called with preemption
> > enabled.
>
> I suppose that would work.
It should indeed. Instead of inserting the new mapping at request_irq() time,
we do it a bit before at create_irq_mapping time.
>
> > The second patch is a little more involved in that it takes advantage of
> > the concurrent radix tree to simplify the locking requirements and allows
> > to allocate a new node outside a preemption disabled section.
> >
> > I just hope I've correctly understood the concurrent radix trees semantic
> > and got the (absence of) locking right.
>
> Hrm, that will need some scrutinity.
Yep, that will need a few more pair of eyes along with brains behind those ;-)
Thanks,
Sebastien.
>
> Thanks for looking at this.
>
> Cheers,
> Ben.
>
>
>
prev parent reply other threads:[~2008-07-24 11:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 14:59 [PATCH 0/2][RT] powerpc - fix bug in irq reverse mapping radix tree Sebastien Dugue
2008-07-23 15:00 ` [PATCH 1/2][RT] powerpc - XICS: move the call to irq_radix_revmap from xics_startup to xics_host_map Sebastien Dugue
2008-07-23 15:01 ` [PATCH 2/2][RT] powerpc - Make the irq reverse mapping radix tree lockless Sebastien Dugue
2008-07-23 22:17 ` [PATCH 0/2][RT] powerpc - fix bug in irq reverse mapping radix tree Benjamin Herrenschmidt
2008-07-24 11:08 ` Sebastien Dugue [this message]
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=20080724130807.23d5252b@bull.net \
--to=sebastien.dugue@bull$(echo .)net \
--cc=Gilles.Carry@ext$(echo .)bull.net \
--cc=benh@kernel$(echo .)crashing.org \
--cc=jean-pierre.dion@bull$(echo .)net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rt-users@vger$(echo .)kernel.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
--cc=tinytim@us$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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