xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: quizyjones <quizy_jones@outlook.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: what's inside hypercall page?
Date: Wed, 2 Mar 2016 15:48:49 +0100	[thread overview]
Message-ID: <56D6FD51.2010902@suse.com> (raw)
In-Reply-To: <SNT152-W2044339F71A9CB8D80FDF690BC0@phx.gbl>

On 02/03/16 15:29, quizyjones wrote:
> After step by step monitoring, I get the following statistics about
> hypercall entries:
> 
> numbers | hypercalls | executed bytes (offset to hypercall entry)
>    7755 24: 0 1 3 8 a c d
>    6374 23: 0 1 3 4 9
>    3281 25: 0 1 3 8 a c d
>    2979 13: 0 1 3 8 a c d
>    2475 17: 0 1 3 8
>    2253 17: a c d
>     749 3: 0 1 3 8 a c d
>     655 23: 0 1 3 4 9 0 1 3 4 9
>     640 29: 0 1 3 8
>     636 29: a c d
>     445 23: 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9
>     433 23: 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9
>     414 24: 0 1 3 8 a c d 0 1 3 8 a c d
>     274 13: *0 1 3 8 8 a c d*
>     129 17: d
>     125 17: a c
>     112 29: a c d 0 1 3 8
>     112 17: c d
>     105 17: a
>      73 24: 0 1 3 8 a c d 0 1 3 8 a c d 0 1 3 8 a c d
>      67 17: 0
>      59 17: 8 a c d
>      54 17: 0 1 3
>      53 17: 0 1
>      50 17: 1 3 8 a c d
>      46 17: 3 8 a c d
>      21 3: 0 1 3 8 a c d 0 1 3 8 a c d
>       8 33: 0 1 3 8 a c d
>       7 17: 1 3
>       6 13: 0 1 3 8 8 8 a c d
>       5 29: d
>       5 23: 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9 0 1 3 4 9
>       4 29: a c
>       4 17: 3
>       3 17: 8 a
>       3 17: 8
>       3 17: 3 8
>       3 17: 1 3 8 a c
>       3 17: 1
>       2 29: 0 1 3 8 a c d
>       2 17: 3 8 a
>       2 17: 1 3 8 a
>       2 17: 1 3 8
>       1 29: c
>       1 29: a
>       1 29: 3 8 a c d
>       1 29: 1 3 8 a c d
>       1 29: 0 1
>       1 29: 0
>       1 17: 3 8 a c
> 
> From the above we can see that hypercall #17 and #29 are very irregular,
> with various combination occurs. Other hypercalls basically obey to the
> sequence of "0 1 3 8 a c d" which conforms to the content in
> hypercall_page_initialise function. HYPERCALL_iret is a special one as
> explained in the function, but it also conforms to its sequence of "0 1
> 3 4 9". So why would #17(do_xen_version) and #29(do_sched_op) performs

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

> irregular? They seem to be easily interrupted at any place of the
> hypercall entry. Besides, there is also some abnormals for
> #13(do_multicall) shown in bold.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-02 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  3:50 what's inside hypercall page? quizyjones
2016-03-02 12:44 ` quizyjones
2016-03-02 14:29   ` quizyjones
2016-03-02 14:48     ` Juergen Gross [this message]
2016-03-03  0:56       ` quizyjones
2016-03-03  5:28         ` Juergen Gross
2016-03-03  7:09           ` quizyjones
2016-03-03  7:27             ` Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D6FD51.2010902@suse.com \
    --to=jgross@suse.com \
    --cc=quizy_jones@outlook.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).