WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 1/2, v2] x86: replace nr_irqs sized per-domain ar

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/2, v2] x86: replace nr_irqs sized per-domain arrays with radix trees
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Wed, 04 May 2011 09:13:51 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Allen M Kay <allen.m.kay@xxxxxxxxx>
Delivery-date: Wed, 04 May 2011 01:14:38 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=E1RbMaW1L+Nq49J8zO4xxaLBBzPtdI5Tm6cUpo5ipmE=; b=ZSN+zWxfzDPAzG+W5ljzFuny6cT9a1qg74bQCagaYs0F95uEHHflNsFyG2t+SVHG6L IhcbjYbxQi2PnUnveZnED/3KjKlsHtTsDe2ES8+l/4ABRURGUakFh3CuZ/LJos91iX7w 8v0RFqXBY9h2VbpQDu8WIhxFgovIX+lsbIG7Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=jHBg0sPm1BLX5+vUU+/DCTvf9kWLdobkZ+40xTAAHlEdwvOKOUeEuFaGPioM2KBeUW PwmIAKA29jaiub9m2HI+RHoQurqF2G6e0rlplwZ0tQ2ezPpho4LQ0M/sZIFamk+SzuHY wgMy/mG6VXByLWx7ZNDD2zONFYaVDNIRh1SRM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DC11C1C020000780003F9DF@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwKMzN3WjEhrilJ10K5k6FR7Y8m6w==
Thread-topic: [Xen-devel] [PATCH 1/2, v2] x86: replace nr_irqs sized per-domain arrays with radix trees
User-agent: Microsoft-Entourage/12.29.0.110113
On 04/05/2011 08:27, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>>>> On 03.05.11 at 23:08, Keir Fraser <keir@xxxxxxx> wrote:
>> On 03/05/2011 15:08, "Jan Beulich" <JBeulich@xxxxxxxxxx> 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.

Actually I'll take a look at it myself.

 -- Keir

> Jan
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel