Sure, thanks for your help Steve! Jiayuan
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Reinhardt Sent: Sunday, May 27, 2007 10:34 PM To: M5 users mailing list Subject: Re: [m5-users] main thread - cpu assignment Hi Jiayuan, You're right, it's arbitrary... it's not something we've ever had to worry about before. The current situation is that the thread contexts are bound to CPUs via each CPU's init() method (see cpu/base.cc). The init() methods are called on each SimObject in arbitrary order. The thread contexts are then handed out to the CPUs in the order in which they call Process::registerThreadContext(). If you want more control over this, you'll have to change this code somehow. Perhaps you could pass the CPU's cpu_id parameter in to Process::registerThreadContext() to select which context gets handed to the CPU... sort of along the lines of what FS mode already does (i.e. end up making Process::registerThreadContext() look more like System::registerThreadContext()). If you do this and it works well, please send us a patch and we'll see if we can get it in the next release. Steve Jiayuan Meng wrote: > Hey all, > > Quick question, how do assign the main thread to a specified cpu(core) > in a multi-core configuration? I notice that for each process, > threadcontext[0] will be used as the main thread. However, it seems to > be undeterministic to specify which cpu gets this threadcontext[0]. I > am now using a heterogeneous configuration, with a control cpu and > several slave cpus, and I want the main thread assigned to the control cpu. > However, no matter how I changed the order in which the cpus are > defined and used in the python script, it's always a slave cpu that > gets threadcontext[0]. > > Thanks! > > Jiayuan > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > m5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users _______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users _______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
