Op 16 okt. 2013, om 11:20 heeft Phil Blundell <p...@pbcl.net> het volgende 
geschreven:

> On Wed, 2013-10-16 at 09:25 +0200, Koen Kooi wrote:
>> From: Koen Kooi <koen.k...@linaro.org>
>> 
>> This enables aes and sha1 assembly at buildtime. Openssl does a
>> runtime check to see which portion gets enabled.
> 
> [...]
> 
>> Algo    blocksize       ops/s after
>>                ops/s before    difference
>> -------------------------------------------
>> MD5  16      308,766 264,664 -14.28%
>>      64      277,090 263,340 -4.96%
>>      256     212,652 197,043 -7.34%
>>      1024    103,604 100,157 -3.33%
>>      8192    17,936  17,796  -0.78%
> 
> Do you know why it's causing MD5 to get slower?  I guess md5 with
> blocksize=16 is not a very common case, but still.

I really don't know and it is the only algo that gets a lot slower. This patch 
is a preparation for (more) NEON optimizations which seem to fix the 
regression, see

        
https://docs.google.com/spreadsheet/ccc?key=0AhgZ33Tf6eBldHVONjRXRnItWld4eFlRWTJ3RzVIdGc&usp=sharing

and

        
http://dominion.thruhere.net/koen/angstrom/0002-openssl-1.0.1e-add-ARMv7-AES-optimizations.patch

I need to test that patch on A9 and A15 cores as well since it doesn't seem to 
do a lot on A8 cores :(

> Also, it seems generally a bit unwholesome for openssl to be picking its
> own CFLAGS at all.  Would it be better to just make it use the same
> CFLAGS as everything else?

openssl.inc already pokes at CLAG(S):

CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', 
'-DB_ENDIAN', d)} \
        -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack"

The complete command looks like this:

arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork 
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 
--sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone
 -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT 
-DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN  -DTERMIO  -O2 -pipe -g 
-feliminate-unused-debug-types -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV 
-DUSE_CRYPTODEV_DIGESTS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM 
-DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -c   -c -o 
armv4cpuid.o armv4cpuid.S

So the '$cflags       = -DTERMIO -O3 -Wall' in linux-armv4 gets overridden by 
OE, just like we want :)

regards,

Koen
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to