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] use xs_watch from userspace and use epoll instead of sel

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] use xs_watch from userspace and use epoll instead of select
From: Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
Date: Mon, 06 Jun 2011 14:05:12 +0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 06 Jun 2011 03:05:56 -0700
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Content-Transfer-Encoding:Mime-Version:Message-ID:Date:Content-Type:References:In-Reply-To:Cc:To:Reply-To:From:Subject; bh=3BubbJxN6J654mtoN/i+56ygGmi/0NVOAlIyNrhcB0w=; b=iOdCuw8fQOh3VfCB5XkhXaMjPPtA7qacp9jcpvC6SI6C6hYrAAdjy5vHIqmV8zPDtw2IfKsG7arTMa+v21MLJOZ5UOTB26uKBkxhuyjNllmgev8q9Xlxd7Jh/5K5YM1a;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1307353709.775.431.camel@xxxxxxxxxxxxxxxxxxxxxx>
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>
Organization: Selfip.Ru
References: <1307102689.15777.3.camel@vase> <1307103239.775.382.camel@xxxxxxxxxxxxxxxxxxxxxx> <1307103479.15777.5.camel@vase> <1307117238.15777.7.camel@vase> <1307349708.775.419.camel@xxxxxxxxxxxxxxxxxxxxxx> <1307350709.28250.2.camel@vase> <1307353709.775.431.camel@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: v.tolstov@xxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-06-06 at 10:48 +0100, Ian Campbell wrote:
> On Mon, 2011-06-06 at 09:58 +0100, Vasiliy G Tolstov wrote:
> > Code to using from domU. I'm correct all my mistakes and now relative
> > and full path watches work's fine with epoll and select based looping.
> > Sorry for wrong panic about it. 
> 
> Oh good.
> 
> > Sorry for small offtop, where i can find example to use grand pages to
> > transfer for example 1byte from domU to dom) and vice versa?
> 
> (it's "grant" pages).
> 
> Any of the PV drivers would give a decent example for in kernel use of
> grant tables to setup a shared memory buffer, but I guess you are asking
> for a userspace example? The principals are mostly the same, except you
> use xc_* functions instead of the kernel ones.
> 
> qemu contains some userspace backends, for example the xenfb backend.
> Daniel de Graaf posted some patches to make this use grant tables back
> in February/March this year -- you should check the ML archives. There
> are also PV disk and net backends in qemu.
> 
> I can't think of any userspace frontends offhand.
> 
> Once you have a shared page you can use the standard Xen ring.h
> datastructures to define your request and response protocol.
> 
> What are you actually trying to build?
> 
> Ian.
> 

I'm try to build daemon, that can recieve command via xenstore (xs_watch
for specific path), via /dev/hvcN (serial char interface), now i'm try
to use gntmem mechanism to do this too. If one method not available or
not work or some errors accured - i'm try next. 
/dev/hvcN Not good sometimes, becouse in some domU i have gentty on this
port.
xenstore - has limit in size of message...
In kernel side xen thing more easy to understand. Use it under userspace
need deep googling =).
Ok if i use grant pages mechanism - do i have notify for new message
after it arrives? If i use xs from domU i need libxc under it insted of
libxenstore ?

-- 
Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
Selfip.Ru


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