Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161721AbbBDUjA (ORCPT ); Wed, 4 Feb 2015 15:39:00 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:41430 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934021AbbBDUi7 convert rfc822-to-8bit (ORCPT ); Wed, 4 Feb 2015 15:38:59 -0500 From: Daniel Sanders To: Pekka Enberg CC: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 1/5] LLVMLinux: Correct size_index table before replacing the bootstrap kmem_cache_node. Thread-Topic: [PATCH 1/5] LLVMLinux: Correct size_index table before replacing the bootstrap kmem_cache_node. Thread-Index: AQHQP7aUH+eb/1DBC0ORw+aLnTtUHpzg43OAgAANyJA= Date: Wed, 4 Feb 2015 20:38:56 +0000 Message-ID: References: <1422970639-7922-1-git-send-email-daniel.sanders@imgtec.com> <1422970639-7922-2-git-send-email-daniel.sanders@imgtec.com> <54D27403.90000@iki.fi> In-Reply-To: <54D27403.90000@iki.fi> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.14.109] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 24 > -----Original Message----- > From: Pekka Enberg [mailto:penberg@iki.fi] > Sent: 04 February 2015 19:33 > To: Daniel Sanders > Cc: Christoph Lameter; Pekka Enberg; David Rientjes; Joonsoo Kim; Andrew > Morton; linux-mm@kvack.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 1/5] LLVMLinux: Correct size_index table before > replacing the bootstrap kmem_cache_node. > > On 2/3/15 3:37 PM, Daniel Sanders wrote: > > This patch moves the initialization of the size_index table slightly > > earlier so that the first few kmem_cache_node's can be safely allocated > > when KMALLOC_MIN_SIZE is large. > > The patch looks OK to me but how is this related to LLVM? > > - Pekka I don't believe the bug to be LLVM specific but GCC doesn't normally encounter the problem. I haven't been able to identify exactly what GCC is doing better (probably inlining) but it seems that GCC is managing to optimize to the point that it eliminates the problematic allocations. This theory is supported by the fact that GCC can be made to fail in the same way by changing inline, __inline, __inline__, and __always_inline in include/linux/compiler-gcc.h such that they don't actually inline things. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/