[OE-core] [PATCH] db: disable the ARM assembler mutex code

Khem Raj raj.khem at gmail.com
Fri Nov 4 23:55:21 UTC 2016


Phil

On 11/4/16 4:14 PM, Phil Blundell wrote:
> On Fri, 2016-11-04 at 11:22 -0700, Khem Raj wrote:
>>
>>
>> On 11/4/16 2:07 AM, Li Zhou wrote:
>>>
>>> The swpb in macro MUTEX_SET will cause "undefined instruction"
>>> error
>>> on the new arm arches which don't support this assembly instruction
>>> any more. If use ldrex/strex to replace swpb, the old arm arches
>>> don't
>>> support them. So to avoid this issue, just disable the ARM
>>> assembler
>>> mutex code, and use the default pthreads mutex.
>>>
> 
>> it would be good to keep this for older < armv5 arches
> 
> I guess you meant "<= ARMv5".  STREX etc were introduced in ARMv6, so
> ARMv5 (and ARMv5TE) don't have it.  But in any case, won't the default
> libpthread mutex work just fine on those older architectures?  There is
> no SMP on anything before ARMv6 anyway so lock contention will be
> relatively low, and it seems fairly unlikely that anybody has a real-
> world application which uses db so heavily that the mutex
> implementation will have any noticeable performance impact.

yes I meant <= v5, it should work usually, I am just thinking its a untested
option, it may not be as bad as I think but some testing might be useful

> 
> And, given that it's now something like 15 years since support for
> STREX was introduced in ARMv6, and more than 10 years since support for
> SWP was deleted in ARMv7, it doesn't seem entirely unreasonable for oe-
> core to pick the newer paradigm as the case to optimise for.  Distros
> that want to target ARMv5 or older are obviously free to do so and they
> can carry the SWP patch locally if they want to.  But as far as oe-core 
> itself is concerned, at this point it seems like it's just scar tissue.

yeah agree here.

> 
> p.
> 



More information about the Openembedded-core mailing list