Actually, I have modeled a 8-core system using
simics, a full-system simulator. All the 8-cores have
the same performance (i.e operate with the same
frequency) but different power consumptions. Now I
would like the dispatcher of my OS to work such as the
core with the least power consumption gets maximum
work  (more threads) as compared to the other cores.
The dispatcher should give high priority to the least
power consuming core and low priority to the cores
consuming more power.
 Since I am new to this OS developing business, I
thought I will start my work by initially moving all
threads to a single core to know about how threads get
dispatched which will be useful for me to schedule the
threads in a power efficient manner in the later
stages of my work.

Note : I am using a real system instead of simics in
the initial stages of my work so that I can save some
valuable time. I will be using simics once I develop a
 proper dispatcher of my simulated system.

Thank You.
 Abu Saad
--- "Li, Aubrey" <aubrey.li at intel.com> wrote:

> On Friday, September 28, 2007 2:58 PM,
> tesla-dev-bounces at opensolaris.org
> wrote:
> 
> > Hi,
> > I am doing academic research on Process Variations
> in
> > Multi-Core systems. As part of my  project I want
> to
> > schedule all my threads to a single core to get a
> feel
> > of developing opensolaris. I am using a Dual Core
> > Sytem and have installed opensolaris on a Virtual
> > Machine. I tried dispatching all threads to a
> single
> > core but am not getting the desired results.
> > The changes I have made to the source code is as
> > follows:
> > 
> > 1)In the usr/src/uts/common/disp/disp.c , I have
> > replaced the function disp_lowpri_cpu with my own
> > function shown below
> > 
> > /*
> > * disp_lowpower_cpu - schedule all threads to CPU0
> > */
> > cpu_t *disp_lowpower_cpu(cpu_t *hint)
> > {
> >     cpu_t   *bestcpu;
> >     cpu_t   *cp;
> > 
> > 
> >     ASSERT(hint != NULL);
> > 
> >     /*
> >      * Select CPU0
> >      */
> >     bestcpu = hint;
> > 
> >     cp = hint;
> >     do {
> >       if (cp->cpu_seqid == 0){
> >        ASSERT((cp->cpu_flags & CPU_QUIESCED) == 0);
> >                     return(cp);
> >             }
> >             cp = cp->cpu_next;
> >     } while (cp != hint);
> > 
> > 
> >     /*
> >      * Return the best CPU .
> >      */
> >     ASSERT((bestcpu->cpu_flags & CPU_QUIESCED) == 0);
> >     return (bestcpu);
> > }
> > 
> > 2) In lines 1307, 1460, 1613 and in the function
> > cpu_choose (of disp.c) I have replaced the call
> from
> > disp_lowpri_cpu to my function namely
> > disp_lowpower_cpu.
> > 
> > 3) In the file usr/src/uts/common/sys/disp.h I
> have
> > added my function as
> > extern struct cpu *disp_lowpower_cpu(struct cpu
> *);
> > 
> >  Now after these changes I ran the command
> >  nightly -i ./opensolaris.sh
> > and finally did a BFU.
> > 
> > I am expecting to see all the threads dispatched
> to
> > cpu0 but i can see a few of them are still running
> in
> > cpu1. I think I have missed out something very
> simple
> > but am not able to figure it out. Can anyone help
> me
> > in disptaching all the threads to a single core so
> > that I get some confidence in building my own
> > opensolaris.
> > 
> 
> Isn't pbind what you need? Maybe you can describe
> your intention.
> Dispatch all the LWP to one processor and make
> others processor to enter
> power saving mode to save the power?
> 
> -Aubrman 
> 



      5, 50, 500, 5000 - Store N number of mails in your inbox. Go to 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

Reply via email to