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

Re: [Xen-devel] what's inside hypercall page?



What I want to do is predict how many instructions a hypercall entry of hypercall page (not hypercall handler) would execute before it finishes. Take HYPERVISOR_iret as an example, it precisely executes five instructions then call the hypercall handler, and it doesn't return so it just finish. But other hypercall entries expect a return value of syscall and might be interrupted during the execution, just as what you said about do_sched_up and do_xen_version, so it is hard to predict. Is there any solution to this problem? Just like syscall table, how can I predict how many instructions the syscall entries would execute before it actually go to the handler, thus accurately set traps to the syscall?

> Subject: Re: [Xen-devel] what's inside hypercall page?
> To: quizy_jones@xxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxxx
> From: jgross@xxxxxxxx
> Date: Thu, 3 Mar 2016 06:28:06 +0100
>
> On 03/03/16 01:56, quizyjones wrote:
> >> do_sched_op is self explaining: it is used for scheduling of the vcpu.
> >> A vcpu going to idle is using this hypercall. So any interrupt waking
> >> the vcpu up will seem to occur very near to the hypercall.
> >
> >> do_xen_version is often used as a very fast way to execute the check
> >> for pending events in the hypervisor (kind of polling).
> >
> >> do_multicall might run for a long time. So the hypervisor returns to
> >> the caller from time to time setting IP to the hypercall. The caller
> >> has the chance to react to interrupts and will then continue the
> >> hypercall.
> >>
> >>
> >> HTH, Juergen
> >
> >
> > Thanks for the replying. Does that mean we cannot predict when will
> > these two hypercalls finish? I want to set up an interval to monitor the
> > instructions (one time monitor per hypercall), so as to reduce the
> > performance cost. This requires an accurate prediction of instructions'
> > execution so as to avoid missing hypercalls. Is that possible? The main
> > problem is the execution of syscall (0x050f), as each hypercall behaves
> > different, how can I predict where will it go after the syscall returns?
>
> You can't predict how long a hypercall will run, as this depends on multiple
> factors, like the overall load of the host, values of parameters, ...
>
> A hypercall is by it's nature much more complicated than e.g. a simple
> arithmetic operation.
>
> What exactly do you want to achieve?
>
>
> Juergen
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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