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] Questions about device/event channels in Xen.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Questions about device/event channels in Xen.
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 16 Mar 2007 00:34:21 +0000
Cc: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, Liang Yang <multisyncfe991@xxxxxxxxxxx>
Delivery-date: Thu, 15 Mar 2007 17:32:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <BAY125-DAV102E73319DCC90D7ADEC7E93720@xxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <907625E08839C4409CE5768403633E0B018E1A54@xxxxxxxxxxxxxxxxx> <BAY125-DAV102E73319DCC90D7ADEC7E93720@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
The terminology may be confusing you here, so let me just say: Device channels 
are not like Event channels.  They're different concepts...  let me 
elaborate:

> I just have several questions about device and event channel:
> 1. From the implementation point of view, are device and event channel the
> same (i.e. both based on shared memory)?

Event channels don't use interdomain shared memory.  They're like an 
interdomain interrupt line, provided as a service by Xen.  Basically a way 
for a pair of domains to "poke" each other to say "Something just happened 
and there's work for you to do".

The "device channel" uses interdomain shared memory (using grant tables) and 
event channels to emulate the functionality of a device.  For instance, the 
blkfront and blkback drivers do something like the following:

1. blkfront wants to access a block of data
   -> queue a "read request" into memory it shares with blkback
   -> notify blkback in dom0 using an event channel
2. blkback experiences an "interrupt" as a result of the event sent to it
   -> looks in the shared memory to find the request
   -> executes the read operation
   -> puts a response in shared memory
   -> notifies blkfront in the domU using an event channel
3. blkfront experiences an "interrupt" due to the event sent to it
   -> completes processing of the new data

The combination of the shared memory (containing a ring buffer for requests 
and responses) and the event channel provides the facilities for the front 
and back drivers to talk to each other; this is the device channel.

> 2. In Xen papers, it is said up to 1024 channels are supported per domain.
> Does 1024 include both device channel and event channel?

This should be answered by the text above; device channels are a different 
thing, built using event channels.

> 3. Are these device/event channels allocated dynamically or statically for
> each domain?

XenLinux virtual device drivers bind event channels dynamically when they set 
up their communications with another domain.

I think there are some statically allocated event channels for essential 
services (e.g. for XenStore and the domain's console).

> 4. It seems I need to allocate one device channel per device, is this true?

Yes, but the device channel is something you build yourself using shared 
memory and event channels - it's up to you how you implement it.

In summary: event channels and shared memory are concrete services provided by 
Xen using an API.  A "device channel" is a high level term for the way 
drivers use these facilities to communicate.

I hope this helps, please ask if you need any clarification.

Cheers,
Mark

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

<Prev in Thread] Current Thread [Next in Thread>