[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Sched_op hypercall small questions
On Thu, 2011-09-22 at 08:43 +0100, Daniel Castro wrote: > On Thu, Sep 22, 2011 at 3:30 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote: > Thanks for the answer Ian, one question: If I do not manually change > the mask bit, then after writing to the ring and the response arrives > how can I be sure that xenstore is delivering an event? Add some printfs in the daemon? > I am suspecting that xenstore does not use event notification for simple > read and write operations. Could I be right? I don't think so, how else would it notify the client end that it should look into the ring? In the daemon the do_read() function calls the same common send_reply() as most (all?) other commands. send_reply queues a message on conn->out_list. Later on write_messages() dequeues it and calls the connections write method, which is writechn() in this case (the other case is a local socket connection which uses writefd but isn't relevant here). writechn() has an xc_evtchn_notify() at the end. Ian. > > > > >> > >> Thanks > >> > > >> >>>> 3. If I issue the hypercall and the event never comes is it possible > >> >>>> to to yield the CPU for ever? > >> >>> Yes, if you do not specify a timeout. > >> >> Keir thanks for the answer. > >> >> > >> >> I am trying to read from xenstore, so I have the following: > >> >> I write on my xenstore ring the query I want, then, > >> >> hypercall_event_channel_op(EVTCHNOP_send ... > >> >> If I read the ring inmediatly the answer is not ready so I issue a > >> >> hypercall_sched_op(SCHEDOP_poll, &poll); > >> >> But while I am entering the yield state the answer comes, so the event > >> >> is never seen because it has already been delivered. > >> > > >> > It generally only makes sense to poll on masked events. > >> > > >> >> > >> >> If I use some way to wait (just for very brief instant) after the > >> >> event_channel_op send then, when I check the ring the answer is there; > >> >> And I do not need to yield the CPU. > >> >> > >> >> Should I issue the wait after the send, rather than when I am about to > >> >> read the answer? > >> > > >> > What environment is this in? > >> > > >> > J > >> > > >> > >> > >> > >> -- > >> +-=====---------------------------+ > >> | +---------------------------------+ | This space intentionally blank > >> for notetaking. > >> | | | Daniel Castro, | > >> | | | Consultant/Programmer.| > >> | | | U Andes | > >> +-------------------------------------+ > >> > >> > >> > > > > > > > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |