Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbcDGGbc (ORCPT ); Thu, 7 Apr 2016 02:31:32 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:33593 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbcDGGbb (ORCPT ); Thu, 7 Apr 2016 02:31:31 -0400 MIME-Version: 1.0 In-Reply-To: <87wpoay10o.fsf@tassilo.jf.intel.com> References: <57031D9D.801@gmail.com> <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> <87wpoay10o.fsf@tassilo.jf.intel.com> From: Dmitry Vyukov Date: Thu, 7 Apr 2016 08:31:09 +0200 Message-ID: Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions To: Andi Kleen Cc: zengzhaoxiu@163.com, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko , bp@suse.de, Andrew Morton , Kees Cook , LKML , Zhaoxiu Zeng Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1013 Lines: 26 On Wed, Apr 6, 2016 at 9:45 PM, Andi Kleen wrote: > zengzhaoxiu@163.com writes: > >> From: Zhaoxiu Zeng >> >> 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.