From: "michele.paolino" <michele.paolino@studio.unibo.it>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: generate random numbers
Date: Fri, 26 Feb 2010 19:54:34 +0100 [thread overview]
Message-ID: <14f366f91002261054r593aa3d1wc3de3fa7fbc1257d@mail.gmail.com> (raw)
In-Reply-To: <4B880897.6080205@eu.citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2025 bytes --]
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
<george.dunlap@eu.citrix.com>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 <mailto: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
>>
>>
>>
>>
>
[-- Attachment #1.2: Type: text/html, Size: 2818 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-02-26 18:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 20:31 generate random numbers michele.paolino
2010-02-12 1:51 ` James Harper
2010-02-12 8:32 ` michele.paolino
2010-02-12 12:15 ` George Dunlap
2010-02-12 22:42 ` michele.paolino
2010-02-12 23:12 ` Daniel Stodden
2010-02-25 18:31 ` michele.paolino
2010-02-25 21:25 ` George Dunlap
2010-02-26 17:43 ` michele.paolino
2010-02-26 17:44 ` George Dunlap
2010-02-26 18:54 ` michele.paolino [this message]
2010-03-01 11:41 ` George Dunlap
2010-03-01 16:56 ` michele.paolino
2010-03-02 12:58 ` George Dunlap
2010-03-03 7:52 ` michele.paolino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14f366f91002261054r593aa3d1wc3de3fa7fbc1257d@mail.gmail.com \
--to=michele.paolino@studio.unibo.it \
--cc=Xen-devel@lists.xensource.com \
--cc=george.dunlap@eu.citrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).