[PATCH] powerpc: Avoid taking a data miss on every userspace instruction miss
Christophe LEROY
christophe.leroy at c-s.fr
Thu Apr 13 02:15:55 AEST 2017
Hi Anton,
Le 04/04/2017 à 00:00, Anton Blanchard a écrit :
> Hi Christophe,
>
>>> - if (user_mode(regs))
>>> + if (!is_exec && user_mode(regs))
>>
>> Shouldn't it also check 'is_write' ?
>> If it is a store, is_write should be set, shouldn't it ?
>
> Thanks, Ben had the same suggestion. I'll add that further optimisation
> in a subsequent patch.
>
> Anton
>
For your information, I made some benchmark test using 'perf stat' with
your app on MPC8321 and MPC885, and I got the following results:
MPC8321 before the change:
Performance counter stats for './fault 1000' (10 runs):
4491.971466 cpu-clock (msec)
( +- 0.03% )
47386 faults
( +- 0.02% )
4.727864465 seconds time elapsed
( +- 0.17% )
MPC8321 after your change:
Performance counter stats for './fault 1000' (10 runs):
4278.738845 cpu-clock (msec)
( +- 0.02% )
35181 faults
( +- 0.02% )
4.504443891 seconds time elapsed
( +- 0.19% )
MPC8321 after changing !is_exec by is_write
Performance counter stats for './fault 1000' (10 runs):
4268.187261 cpu-clock (msec)
( +- 0.03% )
35181 faults
( +- 0.01% )
4.489207922 seconds time elapsed
( +- 0.20% )
MPC885 before the change:
Performance counter stats for './fault 500' (10 runs):
726605854 cpu-cycles
( +- 0.03% )
176067 dTLB-load-misses
( +- 0.08% )
52722 iTLB-load-misses
( +- 0.01% )
25718 faults
( +- 0.03% )
5.795924654 seconds time elapsed
( +- 0.14% )
MPC885 after your change:
Performance counter stats for './fault 500' (10 runs):
711233251 cpu-cycles
( +- 0.04% )
152462 dTLB-load-misses
( +- 0.09% )
52715 iTLB-load-misses
( +- 0.01% )
19611 faults
( +- 0.02% )
5.673784606 seconds time elapsed
( +- 0.14% )
MPC885 after changing !is_exec by is_write
Performance counter stats for './fault 500' (10 runs):
710904083 cpu-cycles
( +- 0.05% )
147162 dTLB-load-misses
( +- 0.06% )
52716 iTLB-load-misses
( +- 0.01% )
19610 faults
( +- 0.02% )
5.672091139 seconds time elapsed
( +- 0.15% )
Christophe
More information about the Linuxppc-dev
mailing list