[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] use xs_watch from userspace and use epoll instead of select



On Mon, 2011-06-06 at 12:18 +0100, Vasiliy G Tolstov wrote:
> On Mon, 2011-06-06 at 12:00 +0100, Ian Campbell wrote:
> > On Mon, 2011-06-06 at 11:05 +0100, Vasiliy G Tolstov wrote:
> > > On Mon, 2011-06-06 at 10:48 +0100, Ian Campbell wrote:
> > 
> > > > What are you actually trying to build?
> > 
> > > 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...
> > 
> > Interesting.
> > 
> > > In kernel side xen thing more easy to understand. Use it under userspace
> > > need deep googling =).
> > 
> > I'm afraid so.
> > 
> > Remember that the underlying grant table hypercall's and mechanisms are
> > the same in both kernel and userspace and the APIs provided reflect that
> > -- userspace is not all that different.
> > 
> > In userspace you might need (actually I think it's probably required)
> > to use the gntalloc driver (added to pvops by Daniel de Graff around
> > 2.6.39 I think) to get memory suitable for granting out.
> > 
> > > 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 ?
> > 
> > Yes you need to notify, libxc provides an interface to event channels as
> > well as grant tables.
> > 
> > You will probably need both libxc and libxenstore. You use xenstore to
> > negotiated the event channel and shared page with your peer and libxc to
> > create, map, signal them etc.
> > 
> > Ian.
> > 
> > 
> 
> Thanks for suggestions. I'm try investigate e-mail list with gntdev
> patches and write example code.

I think it would be great to get some simple examples of doing all these
things from userspace into the tree, or at least posted somewhere.

Ian.


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.