All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Sched_op hypercall small questions
@ 2011-09-20  7:33 Jan Beulich
  2011-09-20  8:31 ` Daniel Castro
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Beulich @ 2011-09-20  7:33 UTC (permalink / raw)
  To: evil.dani; +Cc: keir.xen, xen-devel

>>> Daniel Castro  09/20/11 8:18 AM >>>
>On Tue, Sep 20, 2011 at 2:41 PM, Keir Fraser  wrote:
>> On 19/09/2011 22:21, "Daniel Castro"  wrote:
>>
>>> Greetings all.
>>>
>>> Some small question regarding schedule poll operation hypercall.
>>>
>>> 1. struct sched_poll poll.timeout is measured in what unit of time?
>>> Secs, ms? ns?
>>
>> It is an absolute system time (rather than a duration), in nanoseconds.
>
>really an absolute system time?
>
>When the timeout is set and the timeout is reached, the system behaves
>like if the event had been received? i.e the bit is changed?

No, the bit would remain unset - the poll times out then, it doesn't
"complete".

>>> 2. After issuing the hypercall_sched_op(SCHEDOP_poll, &poll); if no
>>> timeout is used in poll struct how long will I yield the CPU?
>>
>> Until one of the specified event channel ports is pending.
>If the channel port never changes (the event never arrives) then I
>would yield for ever?

Yes.

>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

That would suggest an ordering problem on either or both sides.

>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.
>
>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?

When you start the wait really shouldn't matter. But ordering needs
to be in place so that the event only gets signaled when the consuming
side can actually see what the producer put into the shared data
structure. Since the signaling is done through a hypercall, there
shouldn't really be anything the producer needs to do (unless your
shared data is not in memory).

Jan

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Sched_op hypercall small questions
@ 2011-09-20  5:21 Daniel Castro
  2011-09-20  5:41 ` Keir Fraser
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel Castro @ 2011-09-20  5:21 UTC (permalink / raw)
  To: xen-devel

Greetings all.

Some small question regarding schedule poll operation hypercall.

1. struct sched_poll poll.timeout is measured in what unit of time?
Secs, ms? ns?

2. After issuing the hypercall_sched_op(SCHEDOP_poll, &poll); if no
timeout is used in poll struct how long will I yield the CPU?

3. If I issue the hypercall and the event never comes is it possible
to to yield the CPU for ever?

Thanks you very much for answering these questions.

Daniel Castro
-- 
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |
+-------------------------------------+

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-09-22 10:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20  7:33 Sched_op hypercall small questions Jan Beulich
2011-09-20  8:31 ` Daniel Castro
2011-09-20  9:08   ` Jan Beulich
2011-09-20 10:55     ` Daniel Castro
2011-09-20 11:57       ` Jan Beulich
2011-09-20 12:35         ` Daniel Castro
2011-09-20 12:54           ` Jan Beulich
2011-09-20 12:54           ` Ian Campbell
2011-09-20 12:53         ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2011-09-20  5:21 Daniel Castro
2011-09-20  5:41 ` Keir Fraser
2011-09-20  6:17   ` Daniel Castro
2011-09-21  1:28     ` Jeremy Fitzhardinge
     [not found]       ` <CAP2B859vtSK_tC0J6HWB_m6hjHKM18vZ7Qh6ABFejCiEfxs+6g@mail.gmail.com>
2011-09-22  5:41         ` Daniel Castro
2011-09-22  6:30           ` Ian Campbell
2011-09-22  7:43             ` Daniel Castro
2011-09-22  8:00               ` Ian Campbell
2011-09-22 10:00                 ` Daniel Castro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.