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/
Home Products Support Community News


Re: [Xen-devel] Anyone know how and where the do_sched_op(SCHEDOP_BLOCK)

To: walmart <vmwalmart@xxxxxxxxx>
Subject: Re: [Xen-devel] Anyone know how and where the do_sched_op(SCHEDOP_BLOCK) got called? -- Sam
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 1 Nov 2010 08:18:23 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 01 Nov 2010 01:19:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTinfGwgKy0_Y1EBMPJ6qwvHRAziCaACX6zUJpdi8@xxxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <AANLkTinfGwgKy0_Y1EBMPJ6qwvHRAziCaACX6zUJpdi8@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sun, 2010-10-31 at 05:09 +0000, walmart wrote:
> Hi, all:
> In the 64 bit Xen 4.0.1, compiled from the source code,
> under xen/common/schedule.c,
> ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE(void) arg).
> Does anyone know how this function got called?

It is an entry point for a hypercall so it will potentially be called
from any guest OS. See xen/arch/x86/*/entry.S for the hypercall table
entry which points at this function. In the pvops Linux kernel see the
callers of HYPERVISOR_sched_op() for the users of this hypercall.

There are some other callers in the HVM code called in response to
certain events which lead to scheduling type decisions, such as the
guest executing a hlt instruction.


> I raise this question cause I noticed in the default credit based
> scheduler, if I only configure one busy cpu to run(pinned to one
> specific core, it is also the only VCPU on that core). if I run a busy
> loop, I would only get 95% of the utilization.
> I add some printk into the code and found that:
> every 1s, the do_sched_op() would exec, and the cmd is schedop_block.
> which would block the vcpu for 50 ms. (50 ms / 1 s = 5%), causing the
> vcpu can only get 95% of the resources.
> Does anyone know the reason for this?
> Or, does anyone know how and where this do_sched_op() function get
> called? I did a grep and all I can found is the compat_do_sched_op,
> which is not called at all..
> I would highly appreciate your help!
> Thanks very much!
> best!
> Sam
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>