From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasiliy G Tolstov Subject: Re: use xs_watch from userspace and use epoll instead of select Date: Mon, 06 Jun 2011 15:18:44 +0400 Message-ID: <1307359124.28250.9.camel@vase> References: <1307102689.15777.3.camel@vase> <1307103239.775.382.camel@zakaz.uk.xensource.com> <1307103479.15777.5.camel@vase> <1307117238.15777.7.camel@vase> <1307349708.775.419.camel@zakaz.uk.xensource.com> <1307350709.28250.2.camel@vase> <1307353709.775.431.camel@zakaz.uk.xensource.com> <1307354712.28250.7.camel@vase> <1307358029.775.437.camel@zakaz.uk.xensource.com> Reply-To: v.tolstov@selfip.ru Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1307358029.775.437.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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.. -- Vasiliy G Tolstov Selfip.Ru