From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ananth Subject: Re: Issues while running Xen with new RR scheduler Date: Tue, 28 Apr 2009 04:09:36 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001636163d195c3f44046891051c 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 --001636163d195c3f44046891051c Content-Type: multipart/alternative; boundary=001636163d195c3f3d046891051a --001636163d195c3f3d046891051a Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi, Thanks for your suggestion. I was able to change scheduler from credit to sedf. "sched" is the correct parameter. However when I try to select sched=3Drrobin, the system gets ready to boot = and then everything goes blank. I have attached the round robin scheduler code along with this mail. Could you give me your feedback on whether I have missed out something. Thank you very much once again. Warm Regards Ananth On Tue, Apr 28, 2009 at 2:11 AM, George Dunlap wrote: > You need to pass the arguments to xen on the xen command line, not the > dom0 kernel command line. So the following line should be: > > kernel /boot/xen.gz sched=3Drrobin > > (I haven't checked to make sure that "sched" is the right parameter.) > > -George > > On Mon, Apr 27, 2009 at 7:39 PM, Ananth wrote: > > Hi, > > In continuation with my previous post, I am able to login to the compil= ed > > Xen. But it is continuing to run on credit scheduler even if i modify t= he > > kernel parameters to run using round robin scheduler. > > I have pasted the contents of the /boot/grub/menu.lst file. > > > > title Xen -- openSUSE 11.0 - 2.6.18.8 manually compiled AGAIN > > root (hd0,4) > > kernel /boot/xen.gz > > module /boot/vmlinuz-2.6.18.8-xen0 > > root=3D/dev/disk/by-id/scsi-SATA_Hitachi_HTS5416_SB2D04E4CE7YEE-part5 > showopts > > sched=3Drrobin vga=3D0x314 > > module /boot/initrd-2.6.18-xen0 > > > > Incidentally, even if i give sched=3Dsedf, it still runs only on credit > > scheduler. Please let me know your feedback on this issue. My aim is to > > study the performance statistics of credit, sedf and new RR scheduler. = It > > would be great if you could give me any pointers to measure scheduler > > performance or get statistics from the system. > > > > Thanks & Regards > > Ananth > > > > ---------- Forwarded message ---------- > > From: Ananth > > Date: Mon, Apr 27, 2009 at 6:45 PM > > Subject: Re: [Xen-devel] Fwd: Error while compiling with new RR schedul= er > > To: George Dunlap > > Cc: "xen-devel@lists.xensource.com" > > > > > > Hello, > > Thank you so much for pointing it out. How could I miss something so > > obvious. I am able to compile it now. I will get back to you in case I > get > > into any issues during run time. > > > > Thank you. > > > > Regards > > Ananth > > > > On Mon, Apr 27, 2009 at 6:29 PM, George Dunlap > wrote: > >> > >> The message says it pretty clearly: you return the value of ret, but > >> there are control paths in the function for which ret.task is not set. > >> Namely, if list_empty(runq) is true, then you will return an > >> uninitialized value, which may be anything (garbage on the stack, > >> NULL, &c). This will most likely cause Xen to crash, as > >> xen/common/schedule.c assumes that ret.task will be a valid, non-NULL > >> pointer. > >> > >> If you happen to know that runq is never empty, then you don't need > >> the if statement. If it may be empty, then you need an else clause to > >> return the idle vcpu for that processor. > >> > >> -George > >> > >> 2009/4/24 Ananth : > >> > Hi, > >> > I figured out that the error was because of a missing ' ; ' . This h= as > >> > been fixed now. I have attached the modified code. > >> > While compiling I am getting the below error message. > >> > > >> > cc1: warnings being treated as errors > >> > sched_rrobin.c: In function =91rrobin_schedule=92: > >> > sched_rrobin.c:74: error: =91ret.task=92 may be used uninitialized i= n this > >> > function > >> > > >> > Please guide. > >> > > >> > Thanks & Regards > >> > Ananth > >> > > >> > > >> > ---------- Forwarded message ---------- > >> > From: Ananth > >> > Date: Fri, Apr 24, 2009 at 7:25 PM > >> > Subject: Error while compiling with new RR scheduler > >> > To: "xen-devel@lists.xensource.com" > >> > > >> > > >> > Hi, > >> > Please find attached the source code of Round Robin scheduler which = I > am > >> > trying to add to Xen 3.3.1. > >> > I am facing the following error messages while compiling the same. > >> > > >> > sched_rrobin.c:31: error: two or more data types in declaration > >> > specifiers > >> > > >> > sched_rrobin.c: In function =91rrobin_vcpu_init=92: > >> > > >> > sched_rrobin.c:34: error: incompatible types in return > >> > > >> > sched_rrobin.c:51: error: incompatible types in return > >> > > >> > sched_rrobin.c:94: error: initialization from incompatible pointer > type > >> > > >> > I believe the error in line 94 is causing the rest of the error > >> > messages. I have checked with the structure definition in sched-if.h > as well > >> > as the implementation of the same in other schedulers such as SEDF a= nd > >> > Credit. > >> > > >> > Request you to kindly provide your feedback regarding the same. > >> > > >> > Thanks & Regards > >> > Ananth > >> > > >> > > >> > _______________________________________________ > >> > Xen-devel mailing list > >> > Xen-devel@lists.xensource.com > >> > http://lists.xensource.com/xen-devel > >> > > >> > > > > > > > > --001636163d195c3f3d046891051a Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi,
Thanks for your suggestion. I was able to change scheduler from cred= it to sedf. "sched" is the correct parameter.
However when I t= ry to select sched=3Drrobin, the system gets ready to boot and then everyth= ing goes blank. I have attached the round robin scheduler code along with t= his mail. Could you give me your feedback on whether I have missed out some= thing.

Thank you very much once again.

Warm Regards
Ananth

On Tue, Apr 28, 2009 at 2:11 AM, George Dunlap <dunlapg@umich.edu> wrote:
You need to pass = the arguments to xen on the xen command line, not the
dom0 kernel command line. =A0So the following line should be:

kernel /boot/xen.gz sched=3Drrobin

(I haven't checked to make sure that "sched" is the right par= ameter.)

=A0-George

On Mon, Apr 27, 2009 at 7:39 PM, Ananth <
cbananth@gmail.com> wrote:
> Hi,
> In continuation with my previous post, I am able to login to the compi= led
> Xen. But it is continuing to run on credit scheduler even if i modify = the
> kernel parameters to run using round robin scheduler.
> I have pasted the contents of the /boot/grub/menu.lst file.
>
> title Xen -- openSUSE 11.0 - 2.6.18.8 manually compiled AGAIN
> root (hd0,4)
> kernel /boot/xen.gz
> module /boot/vmlinuz-2.6.18.8-xen0
> root=3D/dev/disk/by-id/scsi-SATA_Hitachi_HTS5416_SB2D04E4CE7YEE-part5 = showopts
> sched=3Drrobin vga=3D0x314
> module /boot/initrd-2.6.18-xen0
>
> Incidentally, even if i give sched=3Dsedf, it still runs only on credi= t
> scheduler. Please let me know your feedback on this issue. My aim is t= o
> study the performance statistics of credit, sedf and new RR scheduler.= It
> would be great if you could give me any pointers to measure scheduler<= br> > performance or get statistics from the system.
>
> Thanks & Regards
> Ananth
>
> ---------- Forwarded message ----------
> From: Ananth <cbananth@gmail.= com>
> Date: Mon, Apr 27, 2009 at 6:45 PM
> Subject: Re: [Xen-devel] Fwd: Error while compiling with new RR schedu= ler
> To: George Dunlap <dunlapg@umi= ch.edu>
> Cc: "xen-devel@l= ists.xensource.com" <xen-devel@lists.xensource.com>
>
>
> Hello,
> Thank you so much for pointing it out. How could I miss something so > obvious. I am able to compile it now. I will get back to you in case I= get
> into any issues during run time.
>
> Thank you.
>
> Regards
> Ananth
>
> On Mon, Apr 27, 2009 at 6:29 PM, George Dunlap <dunlapg@umich.edu> wrote:
>>
>> The message says it pretty clearly: =A0you return the value of ret= , but
>> there are control paths in the function for which ret.task is not = set.
>> =A0Namely, if list_empty(runq) is true, then you will return an >> uninitialized value, which may be anything (garbage on the stack,<= br> >> NULL, &c). =A0This will most likely cause Xen to crash, as
>> xen/common/schedule.c assumes that ret.task will be a valid, non-N= ULL
>> pointer.
>>
>> If you happen to know that runq is never empty, then you don't= need
>> the if statement. =A0If it may be empty, then you need an else cla= use to
>> return the idle vcpu for that processor.
>>
>> =A0-George
>>
>> 2009/4/24 Ananth <cbanant= h@gmail.com>:
>> > Hi,
>> > I figured out that the error was because of a missing ' ;= ' . This has
>> > been fixed now. I have attached the modified code.
>> > While compiling I am getting the below error message.
>> >
>> > cc1: warnings being treated as errors
>> > sched_rrobin.c: In function =91rrobin_schedule=92:
>> > sched_rrobin.c:74: error: =91ret.task=92 may be used uninitia= lized in this
>> > function
>> >
>> > Please guide.
>> >
>> > Thanks & Regards
>> > Ananth
>> >
>> >
>> > ---------- Forwarded message ----------
>> > From: Ananth <cbanan= th@gmail.com>
>> > Date: Fri, Apr 24, 2009 at 7:25 PM
>> > Subject: Error while compiling with new RR scheduler
>> > To: "xe= n-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
>> >
>> >
>> > Hi,
>> > Please find attached the source code of Round Robin scheduler= which I am
>> > trying to add to Xen 3.3.1.
>> > I am facing the following error messages while compiling the = same.
>> >
>> > sched_rrobin.c:31: error: two or more data types in declarati= on
>> > specifiers
>> >
>> > sched_rrobin.c: In function =91rrobin_vcpu_init=92:
>> >
>> > sched_rrobin.c:34: error: incompatible types in return
>> >
>> > sched_rrobin.c:51: error: incompatible types in return
>> >
>> > sched_rrobin.c:94: error: initialization from incompatible po= inter type
>> >
>> > I believe the error in line 94 is causing the rest of the err= or
>> > messages. I have checked with the structure definition in sch= ed-if.h as well
>> > as the implementation of the same in other schedulers such as= SEDF and
>> > Credit.
>> >
>> > Request you to kindly provide your feedback regarding the sam= e.
>> >
>> > Thanks & Regards
>> > Ananth
>> >
>> >
>> > _______________________________________________
>> > Xen-devel mailing list
>> > Xen-devel@li= sts.xensource.com
>> > http://lists.xensource.com/xen-devel
>> >
>> >
>
>
>

--001636163d195c3f3d046891051a-- --001636163d195c3f44046891051c Content-Type: text/x-csrc; charset=US-ASCII; name="sched_rrobin.c" Content-Disposition: attachment; filename="sched_rrobin.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fu1s21ks0 I2luY2x1ZGUgPHhlbi9saWIuaD4KI2luY2x1ZGUgPHhlbi9zY2hlZC5oPgojaW5jbHVkZSA8eGVu L3RpbWUuaD4KI2luY2x1ZGUgPHhlbi9zY2hlZC1pZi5oPgojaW5jbHVkZSA8eGVuL3NvZnRpcnEu aD4KI2luY2x1ZGUgPHhlbi9lcnJuby5oPgojaW5jbHVkZSA8eGVuL2xpc3QuaD4KI2luY2x1ZGUg PHhlbi90aW1lci5oPgoKI2RlZmluZSBFRE9NX0lORk8oZCkgICAoKHN0cnVjdCBycm9iaW5fdmNw dV9pbmZvICopKChkKS0+c2NoZWRfcHJpdikpCiNkZWZpbmUgQ1BVX0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2hlZF9pZCAgICAgICA9IFhFTl9TQ0hFRFVMRVJfU0VERiwKCiAgICAuaW5pdF92Y3B1 ICAgICAgPSBycm9iaW5fdmNwdV9pbml0LAogICAgLmRlc3Ryb3lfdmNwdSAgID0gcnJvYmluX3Zj cHVfZGVzdHJveSwKCiAgICAuZG9fc2NoZWR1bGUgICAgPSBycm9iaW5fc2NoZWR1bGUsCgp9OwoK Cg== --001636163d195c3f44046891051c 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 --001636163d195c3f44046891051c--