From: "Jan Beulich" <JBeulich@novell.com>
To: Keir Fraser <keir@xen.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Allen M Kay <allen.m.kay@intel.com>
Subject: Re: [PATCH 1/2, v2] x86: replace nr_irqs sized per-domain arrays with radix trees
Date: Wed, 04 May 2011 08:27:56 +0100 [thread overview]
Message-ID: <4DC11C1C020000780003F9DF@vpn.id2.novell.com> (raw)
In-Reply-To: <C9E62D62.2CE08%keir@xen.org>
>>> On 03.05.11 at 23:08, Keir Fraser <keir@xen.org> wrote:
> On 03/05/2011 15:08, "Jan Beulich" <JBeulich@novell.com> wrote:
>
>> It would seem possible to fold the two trees into one (making e.g. the
>> emuirq bits stored in the upper half of the pointer), but I'm not
>> certain that's worth it as it would make deletion of entries more
>> cumbersome. Unless pirq-s and emuirq-s were mutually exclusive...
>>
>> v2: Split setup/teardown into two stages - (de-)allocation (tree node
>> (de-)population) is done with just d->event_lock held (and hence
>> interrupts enabled), while actual insertion/removal of translation data
>> gets done with irq_desc's lock held (and interrupts disabled).
>
> This is mostly okay, because the only operations that occur with irqs
> disabled are read-only on the radix-rtree structure itself, hence no
> alloc/dealloc will happen. *However* those calls to
> radix_tree_lookup[_slot]() are not synchronised wrt your calls to
> radix_tree_{insert,delete}(). The latter hold d->event_lock, while the
> former do not. Hence you need RCU and you need a new first patch in your
> patch set to pull in a modern radix-tree.[ch] from upstream Linux.
Right you are - I didn't pay attention to the tree internal nodes.
Will take a few days though before I can get to this.
Jan
next prev parent reply other threads:[~2011-05-04 7:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 14:08 [PATCH 1/2, v2] x86: replace nr_irqs sized per-domain arrays with radix trees Jan Beulich
2011-05-03 21:08 ` Keir Fraser
2011-05-04 7:27 ` Jan Beulich [this message]
2011-05-04 8:13 ` Keir Fraser
2011-05-04 16:13 ` Dan Magenheimer
2011-05-04 19:55 ` Keir Fraser
2011-05-04 20:37 ` Keir Fraser
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=4DC11C1C020000780003F9DF@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=allen.m.kay@intel.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).