From: Ananth Subject: Re: Fwd: Next vcpu in queue Date: Fri, 24 Apr 2009 15:27:30 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0282739647==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0282739647== Content-Type: multipart/alternative; boundary=0016361e868e58708a04684a06b1 --0016361e868e58708a04684a06b1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I looked through their code. But the issue I am facing is, they are specifically designed for an SMP environment. Whereas I am not too concerned about getting this working on SMP. Also, they use a lot of macros specific to their scheduler implementation. It wont be appropriate to copy all of them again to this scheduler code. I have another question. For example, in Credit scheduer, is the list of VCPUs created while running the sched_credit.c? Or is it created through other files which is accessed through data structures in this file? Because, if it is created only in this file, then I must create the list from the sched_rrobin.c file also. Thanks & Regards Ananth On Fri, Apr 24, 2009 at 2:48 PM, George Dunlap wrote: > Have you looked through the other schedulers (xen/common/sched_sedf.c, > xen/common/sched_credit.c) to see if you can learn anything / copy any > code? > > -George > > On Fri, Apr 24, 2009 at 5:29 AM, Ananth wrote: > > > > Hi, > > In connection with my previous mail, I have attached a file. This file > has > > source code picked up from the book, 'The definitive guide to Xen > > hypervisor', for adding a simple scheduler to xen. > > > > In the functions, rrobin_vcpu_init and rrobin_vcpu_destroy, the book uses > > (probably a macro call) VCPU_NEXT(struct vcpu). But there is no > definition > > given for that function. It would be great if you can point to an > existing > > function from xen 3.3.1 source code can be used. > > > > Also, in the function rrobin_schedule (s_time_t ), the function > > __get_per_cpu is used (line no. 82) , which is not existing in 3.3.1 > code. > > I want to return an idle task. Could you guide me as to which function in > > the 3.3.1 source code would be appropriate for the same? > > > > Thank you very much. > > > > Regards > > Ananth > > > > ---------- Forwarded message ---------- > > From: Ananth > > Date: Fri, Apr 24, 2009 at 9:35 AM > > Subject: Next vcpu in queue > > To: "xen-devel@lists.xensource.com" > > > > > > Hi, > > I am using xen 3.3.1 I want to destroy the head element of that list and > > assign the next in line vcpu as the head. > > I have declared a pointer struct vcpu * vcpu_list_head. > > I would like to assign vpu_list_head = ' get the next vcpu in queue which > > can be scheduled'. I am not sure if there is a already a function > available > > which can do this. > > Please guide. > > > > > > Thank you > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > --0016361e868e58708a04684a06b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I looked through their code. But the issue I am facing is, they are specifi= cally designed for an SMP environment. Whereas I am not too concerned about= getting this working on SMP. Also, they use a lot of macros specific to th= eir scheduler implementation. It wont be appropriate to copy all of them ag= ain to this scheduler code.

I have another question. For example, in Credit scheduer, is the list o= f VCPUs created while running the sched_credit.c? Or is it created through = other files which is accessed through data structures in this file?
Because, if it is created only in this file, then I must create the list fr= om the sched_rrobin.c file also.

Thanks & Regards
Ananth
<= br>
On Fri, Apr 24, 2009 at 2:48 PM, George Dunla= p <dunlapg@gmail.= com> wrote:
Have you looked t= hrough the other schedulers (xen/common/sched_sedf.c,
xen/common/sched_credit.c) to see if you can learn anything / copy any
code?

=A0-George

On Fri, Apr 24, 2009 at 5:29 AM, Ananth <cbananth@gmail.com> wrote:
>
> Hi,
> In connection with my previous mail, I have attached a file. This file= has
> source code picked up from the book, 'The definitive guide to Xen<= br> > hypervisor', for adding a simple scheduler to xen.
>
> In the functions, rrobin_vcpu_init and rrobin_vcpu_destroy, the book u= ses
> (probably a macro call) VCPU_NEXT(struct vcpu). But there is no defini= tion
> given for that function. It would be great if you can point to an exis= ting
> function from xen 3.3.1 source code can be used.
>
> Also, in the function rrobin_schedule (s_time_t ), the function
> __get_per_cpu is used (line no. 82) , which is not existing in 3.3.1 c= ode.
> I want to return an idle task. Could you guide me as to which function= in
> the 3.3.1 source code would be appropriate for the same?
>
> Thank you very much.
>
> Regards
> Ananth
>
> ---------- Forwarded message ----------
> From: Ananth <cbananth@gmail.= com>
> Date: Fri, Apr 24, 2009 at 9:35 AM
> Subject: Next vcpu in queue
> To: "xen-devel@l= ists.xensource.com" <xen-devel@lists.xensource.com>
>
>
> Hi,
> I am using xen 3.3.1 I want to destroy the head element of that list a= nd
> assign the next in line vcpu as the head.
> I have declared a pointer struct vcpu * vcpu_list_head.
> I would like to assign vpu_list_head =3D ' get the next vcpu in qu= eue which
> can be scheduled'. I am not sure if there is a already a function = available
> which can do this.
> Please guide.
>
>
> Thank you
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenso= urce.com
> htt= p://lists.xensource.com/xen-devel
>
>

--0016361e868e58708a04684a06b1-- --===============0282739647== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0282739647==--