On Fri, 2007-05-11 at 10:10 +0200, M. Koehrer wrote:
> Hi Jan,
> 
> > As an experiment, you could try implementing the cpuid lookup via
> > raw_smp_processor_id(), given you use 2.6.20. Hmm, maybe/likely some
> > Xenomai tuning is required as well to make sure that the PDA is set
> > correctly when a Xenomai task is created/migrated. Results welcome!
> 
> I have applied a patch (below) to my SMP kernel 2.6.20.4.
> And actually the results are now much better.
> I have been back on my "original" kernel version without the oprofile support.
> The "original" ipipe.c delivered times of 4.5 us per step with my test 
> project.
> The patched ipipe.c (using raw_smp_processor_id()) delivers 1.25 us per step!
> This is really an excellent improvement!
> I do not know if there are any side effects - if not: why not using this 
> method instead
> of the previous one...

We are going to use it. PDAs have been recently introduced and the
I-pipe patch for x86_64 already uses them, but I simply overlooked the
fact that they have been made available for x86 too. Will fix, thanks.

> 
> Regards
> 
> Mathias
> 
> ------------------------- patch start ------------------
> --- ipipe.c.orig        2007-05-09 16:16:32.000000000 +0200
> +++ ipipe.c     2007-05-11 10:00:44.000000000 +0200
> @@ -74,6 +74,7 @@
> 
>  static notrace int __ipipe_hard_cpuid(void)
>  {
> +#if 0
>         unsigned long flags;
>         int cpu;
> 
> @@ -81,6 +82,9 @@
>         cpu = __ipipe_apicid_2_cpu[GET_APIC_ID(apic_read(APIC_ID))];
>         local_irq_restore_hw_notrace(flags);
>         return cpu;
> +#endif
> +        return raw_smp_processor_id();
> +
>  }
> 
>  #endif /* CONFIG_SMP */
> ------------------------- patch end ------------------
> 
> 
-- 
Philippe.



_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to