[Cbe-oss-dev] [PATCH] spufs: enabling /proc/spu_loadavg calculation
Christoph Hellwig
hch at lst.de
Mon Aug 27 23:46:53 EST 2007
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?
More information about the cbe-oss-dev
mailing list