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: Mon, 1 Mar 2010 17:56:46 +0100 [thread overview]
Message-ID: <14f366f91003010856w71bc8b1djba1375f74989d437@mail.gmail.com> (raw)
In-Reply-To: <4B8BA7E3.50700@eu.citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 3745 bytes --]
I'm really sorry, maybe I misunderstood your mail. I don't want anyone to
work for me.:-)
I looked at the functions listed in Xen call trace...I think my problem is
the timer variable called periodic_timer of struct vcpu.
In function remove_entry() there is a switch/case construct that check if
vcpu->periodic_timer->status is initialized at TIMER_STATUS_in_heap or
TIMER_STATUS_in_list. Which one should I use?
Should Initialize it at one of timer status defined in timer.h file?
Thanks,
Michele
On Mon, Mar 1, 2010 at 12:41 PM, George Dunlap
<george.dunlap@eu.citrix.com>wrote:
> If you want us to spend some of our time helping you, you need to
> demonstrate that you've tried to spend some time helping yourself. How
> might rc come to be 0 at that line? What is remove_entry() doing? How
> could this have come about because of something your code did?
>
> An example mail that would get more help would be something like this:
>
> "I've looked at the remove_entry() function, and it seems that the bug can
> be triggered if the input is {some condition}. I looked at where
> remove_entry() is being called, but I can't figure out how it can get that
> condition because of my code."
>
> -George
>
> michele.paolino wrote:
>
>> 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 <mailto: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>
>> <mailto: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: 5023 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-03-01 16:56 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
2010-03-01 11:41 ` George Dunlap
2010-03-01 16:56 ` michele.paolino [this message]
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=14f366f91003010856w71bc8b1djba1375f74989d437@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).