summaryrefslogtreecommitdiffstats
path: root/init/Kconfig
diff options
context:
space:
mode:
authorDavid Laight <David.Laight@ACULAB.COM>2014-07-04 14:35:51 +0000
committerDavid S. Miller <davem@davemloft.net>2014-07-08 14:39:00 -0700
commitb9420e1c87838bcb354ae3495852430413dd9e4b (patch)
treeb0dd1a9022cf37626cd70cdc5f15f7c8507b7647 /init/Kconfig
parentbe1f4f48cef17c6ea9350db04c774dc8eb252158 (diff)
downloadlinux-b9420e1c87838bcb354ae3495852430413dd9e4b.tar.bz2
net: sctp: Optimise the way 'sctp_arg_t' values are initialised.
Even if memset() is inlined (as on x86) using it to zero the union generates a memory word write of zero, followed by a write of the smaller field, and then a read of the word. As well as being a lot of instructions the sequence is unlikely to be optimised by the store-load forward hardware so will be slow. Instead allocate a field of the union that is the same size as the entire union and write a zero value to it. The compiler will then generate the required value in a register. Zeroing the union shouldn't be necessary, but this patch series isn't intended to have a behavioural change. Signed-off-by: David Laight <david.laight@aculab.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init/Kconfig')
0 files changed, 0 insertions, 0 deletions