[RFC PATCH v4 00/11] powerpc: switch VDSO to C implementation.
Christophe Leroy
christophe.leroy at c-s.fr
Tue Jan 21 01:56:00 AEDT 2020
Hi
On 01/17/2020 08:58 AM, Segher Boessenkool wrote:
> Hi!
>
> On Thu, Jan 16, 2020 at 05:58:24PM +0000, Christophe Leroy wrote:
>> On a powerpc8xx, with current powerpc/32 ASM VDSO:
>>
>> gettimeofday: vdso: 907 nsec/call
>> clock-getres-realtime: vdso: 484 nsec/call
>> clock-gettime-realtime: vdso: 899 nsec/call
>>
>> The first patch adds VDSO generic C support without any changes to common code.
>> Performance is as follows:
>>
>> gettimeofday: vdso: 1211 nsec/call
>> clock-getres-realtime: vdso: 722 nsec/call
>> clock-gettime-realtime: vdso: 1216 nsec/call
>>
>> Then a few changes in the common code have allowed performance improvement. At
>> the end of the series we have:
>>
>> gettimeofday: vdso: 974 nsec/call
>> clock-getres-realtime: vdso: 545 nsec/call
>> clock-gettime-realtime: vdso: 941 nsec/call
>>
>> The final result is rather close to pure ASM VDSO:
>> * 7% more on gettimeofday (9 cycles)
>> * 5% more on clock-gettime-realtime (6 cycles)
>> * 12% more on clock-getres-realtime (8 cycles)
>
> Nice! Much better.
>
> It should be tested on more representative hardware, too, but this looks
> promising alright :-)
>
mpc832x (e300c2 core) at 333 MHz:
Before:
gettimeofday: vdso: 235 nsec/call
clock-getres-realtime-coarse: vdso: 1668 nsec/call
clock-gettime-realtime-coarse: vdso: 1338 nsec/call
clock-getres-realtime: vdso: 135 nsec/call
clock-gettime-realtime: vdso: 244 nsec/call
clock-getres-boottime: vdso: 1232 nsec/call
clock-gettime-boottime: vdso: 1935 nsec/call
clock-getres-tai: vdso: 1257 nsec/call
clock-gettime-tai: vdso: 1898 nsec/call
clock-getres-monotonic-raw: vdso: 1229 nsec/call
clock-gettime-monotonic-raw: vdso: 1541 nsec/call
clock-getres-monotonic-coarse: vdso: 1699 nsec/call
clock-gettime-monotonic-coarse: vdso: 1477 nsec/call
clock-getres-monotonic: vdso: 135 nsec/call
clock-gettime-monotonic: vdso: 283 nsec/call
With the series:
gettimeofday: vdso: 271 nsec/call
clock-getres-realtime-coarse: vdso: 159 nsec/call
clock-gettime-realtime-coarse: vdso: 184 nsec/call
clock-getres-realtime: vdso: 163 nsec/call
clock-gettime-realtime: vdso: 281 nsec/call
clock-getres-boottime: vdso: 169 nsec/call
clock-gettime-boottime: vdso: 274 nsec/call
clock-getres-tai: vdso: 163 nsec/call
clock-gettime-tai: vdso: 277 nsec/call
clock-getres-monotonic-raw: vdso: 166 nsec/call
clock-gettime-monotonic-raw: vdso: 302 nsec/call
clock-getres-monotonic-coarse: vdso: 159 nsec/call
clock-gettime-monotonic-coarse: vdso: 184 nsec/call
clock-getres-monotonic: vdso: 166 nsec/call
clock-gettime-monotonic: vdso: 274 nsec/call
Christophe
More information about the Linuxppc-dev
mailing list