From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbcDFTpb (ORCPT ); Wed, 6 Apr 2016 15:45:31 -0400 Received: from mga09.intel.com ([134.134.136.24]:56456 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbcDFTpa (ORCPT ); Wed, 6 Apr 2016 15:45:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,448,1455004800"; d="scan'208";a="953153511" From: Andi Kleen To: zengzhaoxiu@163.com Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, dvlasenk@redhat.com, bp@suse.de, akpm@linux-foundation.org, dvyukov@google.com, keescook@chromium.org, linux-kernel@vger.kernel.org, Zhaoxiu Zeng Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions References: <57031D9D.801@gmail.com> <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> Date: Wed, 06 Apr 2016 12:45:27 -0700 In-Reply-To: <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> (zengzhaoxiu@163.com's message of "Wed, 6 Apr 2016 17:14:45 +0800") Message-ID: <87wpoay10o.fsf@tassilo.jf.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Andi -- ak@linux.intel.com -- Speaking for myself only