On Fri, 2006-07-07 at 15:59 +0200, Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
>  > > xnpod_acc_exec_time() is called from within xnpod_schedule() that is
>  > > called from within xnpod_migrate_thread() at a time where
>  > > threadout->sched is the wrong pointer.
>  > 
>  > Gasp. Unfortunately, we are trapped by an exception case, and I don't
>  > see any better approach.
> We could reimplement an xnpod_migrate_thread() which suspend the calling
> thread and wake up a server thread on the destination CPU, this server
> thread migrating the suspended thread by changing its sched pointer
> outside of xnpod_schedule().

No, really. A small hack to get per-thread accounting should not trigger
a storm of fundamental changes like this.

> Or we can get rid of xnpod_migrate_thread(), it is currently not used by
> any skin.

It's a fundamental feature for placing SMP jobs, and kernel-based
Xenomai threads could not rely on sched_setscheduler() to do it. Let's
keep this service, and simply pass the sched pointer to the accumulation
routine; I was wrong initially suggesting the opposite. IOW, let's avoid
smashing a squadron of flies with nukes...


Xenomai-core mailing list

Reply via email to