From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752847AbbINHMn (ORCPT ); Mon, 14 Sep 2015 03:12:43 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:34140 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbbINHMm (ORCPT ); Mon, 14 Sep 2015 03:12:42 -0400 Date: Mon, 14 Sep 2015 09:12:31 +0200 From: Peter Zijlstra To: Sedat Dilek Cc: Baoquan He , Denys Vlasenko , Tejun Heo , Christoph Lameter , LKML , Andrew Morton , David Rientjes , Linus Torvalds , Thomas Gleixner , Thomas Graf , Ingo Molnar , the arch/x86 maintainers Subject: Re: [llvmlinux] percpu | bitmap issue? (Cannot boot on bare metal due to a kernel NULL pointer dereference) Message-ID: <20150914071231.GM18489@twins.programming.kicks-ass.net> References: <20150909032541.GC1998@dhcp-17-102.nay.redhat.com> <20150909071410.GD1998@dhcp-17-102.nay.redhat.com> <20150909125424.GP3644@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 13, 2015 at 04:33:39AM +0200, Sedat Dilek wrote: > > It looks like an inline-optimization bug in CLANG when the compiler's > > optimization-level is higher than -O2. > > [1] http://lists.linuxfoundation.org/pipermail/llvmlinux/2015-September/001355.html > > After some discussion on #llvm it turned out to be a known issue in LLVMLinux! > > Unfortunately, an existing patch [1] got archived which is still > required to build x86_64 correctly. > [1] http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob_plain;f=arch/x86_64/patches/ARCHIVE/0029-Fix-ARCH_HWEIGHT-for-compilation-with-clang.patch;hb=HEAD As long as LLVM cannot do things like that and requires full function calls I cannot see it being a sensible compiler to use from a performance POV. There's a fairly large difference between an inline POPCNT instruction and a full out-of-line function call. /me goes back to ignoring LLVM for the time being.