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] Sched_op hypercall small questions

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Sched_op hypercall small questions
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Thu, 22 Sep 2011 19:00:39 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 22 Sep 2011 03:04:38 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=XIgzWJDKZauhC0e2Mxowr9PIpx5FOeZzCMwJxxFW/iY=; b=Zq1dzI2qK20l8tDbK3kQ8Y1TO6YjaX5xOfkYMUFCEy2dAVSPfnP4aCuRgAbShsJW2V RoLivcKSdKfxcYqVcyV1WAsv6+tjaLIfmbyJ/LePmy2J/w7lGrh5xab6Q/9n9PYxzsPH PypsonitFKhl58Yp8fmb17TC6tkxumofP6RjE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1316678423.23371.15.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>
References: <CAP2B85_rPbB=hZpKJYSPgC59jU=YG6deD4ZkWMmXwtMV4un1mg@xxxxxxxxxxxxxx> <CA9D757C.2119E%keir.xen@xxxxxxxxx> <CAP2B85-e64NKts_iC21Bh0OL3X3nUh4jLriYfE2+stHkPfMFWg@xxxxxxxxxxxxxx> <4E793DC4.7080808@xxxxxxxx> <CAP2B859vtSK_tC0J6HWB_m6hjHKM18vZ7Qh6ABFejCiEfxs+6g@xxxxxxxxxxxxxx> <CAP2B85-_kMLh0C6NCBpRbUchNYw96drLVJu33EdKV25jJ=p+4g@xxxxxxxxxxxxxx> <1316673048.27431.7.camel@xxxxxxxxxxxxxxxxxxxx> <CAP2B858_Km8GA0ncNgKyk7u=V3uC9zn5ozwQoirescztW5EKXg@xxxxxxxxxxxxxx> <1316678423.23371.15.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, Sep 22, 2011 at 5:00 PM, Ian Campbell
<Ian.Campbell@xxxxxxxxxxxxx> wrote:
> 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.

You are right as usual, using trace in the deamon in function writechn I get:
DEBUG notify dom 1 on port 42
Form /usr/lib/xen/bin/lsevtchn I get:
42: VCPU 0: Interdomain (Connected) - Remote Domain 1, Port 2
And from the guest I have:
Event is interdomain to dom 0 port 42

So they are interconected and the xenstore deamon is delivering the event.

I am going to check the ring waiting function there has to be
something I am missing....

thanks,
Daniel
>
> 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                         |
>> >> +-------------------------------------+
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>



-- 
+-=====---------------------------+
| +---------------------------------+ | 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