Re: [PATCH v2 10/30] Add x86-specific parity functions
From: Dmitry Vyukov
Date: Thu Apr 07 2016 - 02:31:55 EST
On Wed, Apr 6, 2016 at 9:45 PM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> zengzhaoxiu@xxxxxxx writes:
>
>> From: Zhaoxiu Zeng <zhaoxiu.zeng@xxxxxxxxx>
>>
>> Use alternatives, lifted from arch_hweight
>
> Is there actually anything performance critical in the kernel that uses
> parity?
>
> FWIW the arch hweight custom calling convention is a problem for LTO
> because it needs different special flags, so I usually have to disable
> it. Likely other reasonable usages, such as automatic source code
> analysis, and other tool chain based usages have similar problems.
>
> As far as I can tell both for hweight and likely for parity it is
> badly overengineering and normal calling conventions would work as well,
> and cause much less problems.
>
> So if parity is really worth adding here (which I find doubtful,
> but you may have numbers), please add it without these magic
> calling hacks.
Hweight custom calling convention caused crashes with KCOV coverage.
We had to disable instrumentation of the file.