From mboxrd@z Thu Jan 1 00:00:00 1970 From: "michele.paolino" Subject: Re: generate random numbers Date: Fri, 26 Feb 2010 19:54:34 +0100 Message-ID: <14f366f91002261054r593aa3d1wc3de3fa7fbc1257d@mail.gmail.com> References: <14f366f91002111231reae2e41vc8f823b38e16a76b@mail.gmail.com> <14f366f91002120032uc08b7d6sb2283e10c9444bbf@mail.gmail.com> <14f366f91002121442h536a2d03if7d9bdee416a4a23@mail.gmail.com> <1266016370.15135.2942.camel@agari.van.xensource.com> <14f366f91002251031g538dcffan9fe5208b5d981444@mail.gmail.com> <4B86EADC.70301@eu.citrix.com> <14f366f91002260943n203faba8r79b3c0d4d5d7622d@mail.gmail.com> <4B880897.6080205@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1771809626==" Return-path: In-Reply-To: <4B880897.6080205@eu.citrix.com> 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 --===============1771809626== Content-Type: multipart/alternative; boundary=00032555a02e5c31e40480856f2d --00032555a02e5c31e40480856f2d Content-Type: text/plain; charset=ISO-8859-1 Line 184 correspond at rc = 0 (an int variable) of remove_entry() function. I don't have modified that file. Michele On Fri, Feb 26, 2010 at 6:44 PM, George Dunlap wrote: > Did you look at timer.c, line 184, to find out what the BUG is? > -George > > michele.paolino wrote: > >> Following George's advices I have rewrited my scheduler. But now serial >> console's log report me a bug in a function of timer.c >> >> (XEN) **************************************** >> (XEN) Panic on CPU 0: >> (XEN) Xen BUG at timer.c:184 >> (XEN) **************************************** >> >> This is caused by cpumask_raise_softirq() in my wake() function. What can >> I do? >> >> Michele >> >> On Thu, Feb 25, 2010 at 10:25 PM, George Dunlap < >> george.dunlap@eu.citrix.com > wrote: >> >> The problem is that you're choosing a random vcpu to run, without >> considering whether it *wants* to run or not. In this case, >> you're running a vcpu before it's even been completely set up yet >> (write_cr3 is failing because the guest *has* no cr3 ready yet). >> >> The normal way schedulers deal with this is to keep one list of >> all vcpus (or all domains), and another list with "runnable" >> vcpus. You can keep track of which vcpus are runnable with the >> vcpu_wake() callback and by using vcpu_runnable() in schedule(). >> >> At very least, your loop in schedule should check vcpu_runnable() >> before selecting it. >> >> -George >> >> >> michele.paolino wrote: >> >> Here's my random scheduler. It works until I start a virtual >> machine (error file attached is the serial console's log). >> In xen call trace there isn't any of my functions. >> To generate random numbers I'm using the hash (MD5) of NOW() >> function. >> I would also Know why at boot time there are two calls at >> vcpu_init function for vcpu with id = 0 ?? >> >> Thanks >> Michele >> >> >> >> > --00032555a02e5c31e40480856f2d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Line 184 correspond at rc =3D 0 (an int variable) of remove_entry() functio= n. I don't have modified that file.

Michele


On Fri, Feb 26, 2010 at 6:44 PM, George Dunlap <george.dunlap@= eu.citrix.com> wrote:
Did you look at t= imer.c, line 184, to find out what the BUG is?
-George

michele.paolino wrote:
Following George's advices I have rewrited my scheduler. But now serial= console's log report me a bug in a function of timer.c

(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at timer.c:184
(XEN) ****************************************

This is caused by cpumask_raise_softirq() in my wake() function. What can I= do?

Michele

On Thu, Feb 25, 2010 at 10:25 PM, George Dunlap <george.dunlap@eu.citrix.com &= lt;mailto:= george.dunlap@eu.citrix.com>> wrote:

=A0 =A0The problem is that you're choosing a random vcpu to run, witho= ut
=A0 =A0considering whether it *wants* to run or not. =A0In this case,
=A0 =A0you're running a vcpu before it's even been completely set = up yet
=A0 =A0(write_cr3 is failing because the guest *has* no cr3 ready yet).
=A0 =A0The normal way schedulers deal with this is to keep one list of
=A0 =A0all vcpus (or all domains), and another list with "runnable&qu= ot;
=A0 =A0vcpus. =A0You can keep track of which vcpus are runnable with the =A0 =A0vcpu_wake() callback and by using vcpu_runnable() in schedule().
=A0 =A0At very least, your loop in schedule should check vcpu_runnable() =A0 =A0before selecting it.

=A0 =A0-George


=A0 =A0michele.paolino wrote:

=A0 =A0 =A0 =A0Here's my random scheduler. It works until I start a vi= rtual
=A0 =A0 =A0 =A0machine (error file attached is the serial console's lo= g).
=A0 =A0 =A0 =A0In xen call trace there isn't any of my functions.
=A0 =A0 =A0 =A0To generate random numbers I'm using the hash (MD5) of = NOW()
=A0 =A0 =A0 =A0function.
=A0 =A0 =A0 =A0I would also Know why at boot time there are two calls at =A0 =A0 =A0 =A0vcpu_init function for vcpu with id =3D 0 ??

=A0 =A0 =A0 =A0Thanks
=A0 =A0 =A0 =A0Michele





--00032555a02e5c31e40480856f2d-- --===============1771809626== 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 --===============1771809626==--