[Cbe-oss-dev] [PATCH] spufs: enabling /proc/spu_loadavg calculation

Aegis Lin aegislin at gmail.com
Wed Aug 29 00:34:04 EST 2007


Hi Christoph:

Ok, if there are not others doing the same thing, I'll give it a try.

Best regards,

On 8/27/07, Christoph Hellwig <hch at lst.de> wrote:
> On Thu, Aug 23, 2007 at 09:27:54PM +0900, Aegis Lin wrote:
> > This small patch will really enable the timer logic for calculation of
> > spu_loadavg, for which the original timer did not take effect.
> >
> > Signed-off-by: Aegis Lin <aegislin at gmail.com>
>
> > diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
> > index c784edd..7fd0fac 100644
> > --- a/arch/powerpc/platforms/cell/spufs/sched.c
> > +++ b/arch/powerpc/platforms/cell/spufs/sched.c
> > @@ -930,6 +930,7 @@ int __init spu_sched_init(void)
> >       }
> >       spin_lock_init(&spu_prio->runq_lock);
> >
> > +     init_timer(&spusched_timer);
> >       setup_timer(&spusched_timer, spusched_wake, 0);
>
> setup_timer calls init_timer so this isn't needed.
>
> >       spusched_task = kthread_run(spusched_thread, NULL, "spusched");
> > @@ -938,6 +939,8 @@ int __init spu_sched_init(void)
> >               goto out_free_spu_prio;
> >       }
> >
> > +     mod_timer(&spusched_timer, 0);
>
> We're currently intentionally not starting the timer unless we have
> runnable context.  But this indeed breaks te loadvg calculation, so we
> will need a separate timer for the loadvg that runs at a lower
> frequency.  Do you want to look into this?
>


-- 
<i>Yet another coder currently roaming in Japan...</i>
Yu-Te Aegis Lin, aka AirL
alternative email: ydlin (at) ntu.edu.tw



More information about the cbe-oss-dev mailing list