public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Sebastien Dugue <sebastien.dugue@bull•net>
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>,
	"linuxppc-dev@ozlabs•org" <linuxppc-dev@ozlabs•org>,
	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 08:17:38 +1000	[thread overview]
Message-ID: <1216851458.11027.346.camel@pasglop> (raw)
In-Reply-To: <20080723165932.57e3ada2@bull.net>


>   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 ?

>   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.

>   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.

Thanks for looking at this.

Cheers,
Ben.

  parent reply	other threads:[~2008-07-23 22:18 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 ` Benjamin Herrenschmidt [this message]
2008-07-24 11:08   ` [PATCH 0/2][RT] powerpc - fix bug in irq reverse mapping radix tree Sebastien Dugue

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=1216851458.11027.346.camel@pasglop \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=Gilles.Carry@ext$(echo .)bull.net \
    --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=sebastien.dugue@bull$(echo .)net \
    --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