[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Aw: Re: C3600 kernel/64bit 4.* slow IO due to -mlong-calls

> >> kernel  gcc     binutils    with mlong    without mlong
> >> 4.15.7  4.9.3   2.25.1     13.4 MB/s    27.0 MB/s
> >> 4.15.7  6.4.0   2.25.1     13.4 MB/s    27.0 MB/s
> >> 4.15.7  6.4.0   2.29.1     14.4 MB/s    25.0 MB/s
> > Interesting bad results!
> >   
> It's hard to understand why the performance would deteriorate so much 
> but I see essentially the same behavior.

Speaking of debian kernel, it's nearly impossible to link a kernel without mlong-calls.

Compiling without mlong-calls generates this (R_PARISC_PCREL22F):
        b,l external_func,%r2

With -mlong-calls it is much more complex:
        .dword  P%external_func
.globl a
        addil LT'.LC0,%r27
        ldd RT'.LC0(%r1),%r28
        ldd 0(%r28),%r28
        ldd 16(%r28),%r2
        bve,l (%r2),%r2

Since our kernel is running in the first 4GB of RAM (even on 64bit), couldn't we instead
introduce a gcc option, e.g. "-mkernel-indirect-calls", which translates to:
        ldil    L%external_func, %r2        // R_PARISC_DIR21L
        ldo     R%external_func(%r2), %r2   // R_PARISC_DIR14R  
        bve,l (%r2),%r2

Does -mfast-indirect-calls has any effect at all?
I haven't seen any difference when using this option.


Reply to: