[PATCH 1/3] powerpc/tm: Abort syscalls in active transactions
Anshuman Khandual
khandual at linux.vnet.ibm.com
Tue Mar 24 15:26:39 AEDT 2015
On 03/24/2015 07:34 AM, Michael Ellerman wrote:
> On Fri, 2015-03-20 at 14:34 +0530, Anshuman Khandual wrote:
>> On 03/19/2015 10:13 AM, Sam Bobroff wrote:
>>> This patch changes the syscall handler to doom (tabort) active
>>> transactions when a syscall is made and return immediately without
>>> performing the syscall.
>>>
>>> Currently, the system call instruction automatically suspends an
>>> active transaction which causes side effects to persist when an active
>>> transaction fails.
>>>
>>> This does change the kernel's behaviour, but in a way that was
>>> documented as unsupported. It doesn't reduce functionality because
>>> syscalls will still be performed after tsuspend. It also provides a
>>> consistent interface and makes the behaviour of user code
>>> substantially the same across powerpc and platforms that do not
>>> support suspended transactions (e.g. x86 and s390).
>>>
>>> Performance measurements using
>>> http://ozlabs.org/~anton/junkcode/null_syscall.c
>>> indicate the cost of a system call increases by about 0.5%.
>>
>> Performance test results verified which shows an improvement of
>> around ~0.52% with the patch compared to without it.
>>
>> [With patch] null_syscall: 757.59 cycles 100.00%
>> [Without patch]] null_syscall: 753.66 cycles 100.00%
>
> No that's a performance *decrease* with the patch applied. ?
Micheal, thats true. The cycle counts are more with patch being applied.
Here are some more results on mainline.
Without the patch:
null_syscall: 754.14 cycles 100.00%
null_syscall: 754.50 cycles 100.00%
null_syscall: 754.17 cycles 100.00%
null_syscall: 754.43 cycles 100.00%
null_syscall: 754.17 cycles 100.00%
null_syscall: 754.20 cycles 100.00%
null_syscall: 754.47 cycles 100.00%
null_syscall: 754.70 cycles 100.00%
null_syscall: 754.43 cycles 100.00%
null_syscall: 753.72 cycles 100.00%
With the patch:
null_syscall: 756.76 cycles 100.00%
null_syscall: 756.40 cycles 100.00%
null_syscall: 756.46 cycles 100.00%
null_syscall: 756.86 cycles 100.00%
null_syscall: 756.56 cycles 100.00%
null_syscall: 756.66 cycles 100.00%
null_syscall: 756.86 cycles 100.00%
null_syscall: 756.86 cycles 100.00%
null_syscall: 757.02 cycles 100.00%
null_syscall: 756.93 cycles 100.00%
More information about the Linuxppc-dev
mailing list