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

[Xen-users] Re: [Xen-devel] [PATCH] Displaying scheduler related informa

To: Subhabrata Bhattacharya <xions.microcosm@xxxxxxxxxxxxxx>
Subject: [Xen-users] Re: [Xen-devel] [PATCH] Displaying scheduler related information using xm
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Tue, 4 Apr 2006 14:02:42 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 04 Apr 2006 06:03:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <484a4e240603122207x35f9a04egd8b5504b66c29ecb@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <484a4e240603122207x35f9a04egd8b5504b66c29ecb@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Mon, Mar 13, 2006 at 11:37:51AM +0530, Subhabrata Bhattacharya wrote:

> Hi All,
> 
> The attached patch adds two simple scheduler related capabilities to
> the xm tool.
> 
> [Snip]
>
> diff -Naurp xen-3.0.0/tools/python/xen/xend/XendClient.py 
> xen-3.0.0-sched-param/tools/python/xen/xend/XendClient.py
> --- xen-3.0.0/tools/python/xen/xend/XendClient.py     2005-12-05 
> 04:06:31.000000000 +0530
> +++ xen-3.0.0-sched-param/tools/python/xen/xend/XendClient.py 2006-03-09 
> 12:58:36.000000000 +0530
> @@ -291,6 +291,31 @@ class Xend:
>                             'extratime' : extratime,
>                             'weight'    : weight })
>  
> +    ##Scheduler information interface 
> +    def xend_sched_id(self):
> +     import xen.lowlevel.xc
> +     xc = xen.lowlevel.xc.xc()
> +     sched_id = xc.sched_id()
> +     return sched_id 
> +
> +    def xend_sched_param(self, id):
> +
> +     sched_param = {} 
> +     import xen.lowlevel.xc
> +     xc = xen.lowlevel.xc.xc()
> +     if id != -1:
> +             sched_param[0] = xc.sched_param(id)
> +     else:
> +             domid = 0
> +             icnt = 0
> +             domlist = xc.domain_getinfo()
> +             for d in domlist:
> +                     domid = d['dom']
> +                     sched_param[icnt] = xc.sched_param(domid)
> +                     icnt += 1
> +
> +     return sched_param
> +
>      def xend_domain_maxmem_set(self, id, memory):
>          return self.xendPost(self.domainurl(id),
>                               { 'op'      : 'maxmem_set',

Hi Subhabrata,

What you've done here is put the actual interfacing with Xen (i.e. the xc
calls) into XendClient, the code running as the client (xm).  This will mean
that this code will work fine when you are running xm on the machine that you
are monitoring, but it won't work at all in other situations.  In the long
run, people will be using libvirt, for example, to talk XML-RPC to Xend to
manage a machine remotely, and your code won't work in that situation, because
you have no server-side aspect to your code.

Follow the path for something like getVCPUInfo from main.py into
XMLRPCServer.py and XendDomainInfo.py -- you ought to be doing something like
that, I think.

Note also that XMLRPCServer is new since your patch and more or less removes
the need for XendClient.py.  It's hopefully simpler, so shouldn't give you any
difficulty.

The rest of your patch looked good to me.  I'm not an expert on the scheduler
side of things, so someone else might comment, but it looked OK to me.

Thanks,

Ewan.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Re: [Xen-devel] [PATCH] Displaying scheduler related information using xm, Ewan Mellor <=