[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Credit Scheduler code question
The generic schedule code is in common/schedule.c and arch/x86/domain.c. common/schedule/schedule() calls common/sched_credit.c/csched_schedule() to ask which vcpu should be scheduled next on the current pcpu. At the bottom of that function, it calls context_switch(), which can be found in arch/x86/domain.c. __context_switch() in that same file does the register changing; and schedule_tail() at the bottom of context_switch() is what will actually jump back into the vcpu if necessary. Does that help? If you just want to see what vcpus are doing, you can use xentrace to trace runstate-change events, and then use xenalyze to analyze them. Xenalyze can be found here: http://xenbits.xensource.com/ext/xenalyze.hg > I think that it would also be helpfull to know how functions in the struct > scheduler sched_credit_def are called. One thing that may help you to grok the source code is the following magic rune: $ find . -name "*.[cSh]" | xargs grep -H {something I'm looking for} For example, you could have used this to search for "->do_schedule", and found that it was only called from common/schedule.c:schedule(). You can use rgrep as well, but that doesn't allow you to focus on a specific subset of files. :-) -George On Thu, Aug 19, 2010 at 7:05 PM, Marco Antonio <spyke.me@xxxxxxxxx> wrote: > Hi, > > I'm a PhD student trying to add some load balancing code to the credit > scheduler in order to fit some specific necessities. I'm trying to > understand the credit scheduler code and I don't quite get in which part of > it a pcpu starts running a vcpu. I need to keep track of when a vpcu starts > running in a cpu and when it stops. Any hint on that? > > > Thanks, > > Marco. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |