Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>  > Hi,
>  > 
>  > here comes version 2 of my xnlock rework. Changes since the first
>  > release:
>  > 
>  >  - Moved xnlock_spin out-of-line instead uninlining the irqsave/restore
>  >    services
> 
> The size changes are not as dramatic as with the first version. Did you
> have any chance to test the latency with your first version?

Not under the same conditions (isolated core). In essence, the gain was
less significant (~1 us). I came to the conclusion that this might be
due to some loss related to moving xnlock_put_irqrestore out-of-line (I
think now that function was too small for this).

Instead of further digging into this I decided to address the root of
the issue, ie. bringing down the text size of the pipeline-head
services. So you now have to apply the ipipe patch to achieve both a
text size reduction (almost as good as the original one) AND a code path
length reduction (more important!). Actually, I haven't even done a full
benchmark with this patch applied as well yet, but it is not that
interesting as the runtime advantage is obvious (simply less ops).

> 
>  >  - Beautified xnlock_dbg interface (now only static-inlines)
> 
> Well, I am still not convinced, I still find the debugging version harder
> to read. Is there a problem with implementing the two versions
> separately with a unique #ifdef?

Well, everything is possible. But we would start to duplicate LOC again,
namely both the lock implementations and the debugging services. Just
look at the final system.h and pod.h after applying all patches.

I could try this, but only if it is _really_ desired. I'm convinced it
is the wrong way because I consider the readability and consistency of
the lock implementation more important than its debug code.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to