Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753844AbbDBTMi (ORCPT ); Thu, 2 Apr 2015 15:12:38 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:35268 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753691AbbDBTMe (ORCPT ); Thu, 2 Apr 2015 15:12:34 -0400 Date: Thu, 2 Apr 2015 13:12:30 -0600 From: Lina Iyer To: Kevin Hilman Cc: Andrew Morton , Nishanth Menon , Magnus Damm , Russell King - ARM Linux , Arnd Bergmann , Ard Biesheuvel , Marc Zyngier , Tyler Baker , "linux-sh@vger.kernel.org" , Will Deacon , Linux Kernel Development , "linux-mm@kvack.org" , Simon Horman , Geert Uytterhoeven , Catalin Marinas , "grygorii.strashko@linaro.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3 Message-ID: <20150402191230.GA24219@linaro.org> References: <20150327002554.GA5527@verge.net.au> <20150327100612.GB1562@arm.com> <7hbnj99epe.fsf@deeprootsystems.com> <7h8uec95t2.fsf@deeprootsystems.com> <551BBEC5.7070801@arm.com> <20150401124007.20c440cc43a482f698f461b8@linux-foundation.org> <7hwq1v4iq4.fsf@deeprootsystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <7hwq1v4iq4.fsf@deeprootsystems.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2593 Lines: 77 On Wed, Apr 01 2015 at 15:57 -0600, Kevin Hilman wrote: >Andrew Morton writes: > >> On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier wrote: >> >>> > -static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page, >>> > - unsigned long private, struct page *page, int force, >>> > - enum migrate_mode mode) >>> > +static noinline int unmap_and_move(new_page_t get_new_page, >>> > + free_page_t put_new_page, >>> > + unsigned long private, struct page *page, >>> > + int force, enum migrate_mode mode) >>> > { >>> > int rc = 0; >>> > int *result = NULL; >>> > >>> >>> Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of >>> the parameters on the stack, which is not going to help performance >>> either (not that this would be useful on 32bit ARM anyway...). >>> >>> Any chance you could make this dependent on some compiler detection >>> mechanism? >> >> With my arm compiler (gcc-4.4.4) the patch makes no difference - >> unmap_and_move() isn't being inlined anyway. >> >> How does this look? >> >> Kevin, could you please retest? I might have fat-fingered something... > >Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. >However, I'm not sure how specific we can be on the versions. > >/me goes to test a few more compilers... OK... > >ICE: 4.7.1, 4.7.3, 4.8.3 >OK: 4.6.3, 4.9.2, 4.9.3 > >The diff below[2] on top of yours compiles fine here and at least covers >the compilers I *know* to trigger the ICE. I see ICE on arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4 > >Kevin > > >[1] >diff --git a/mm/migrate.c b/mm/migrate.c >index 25fd7f6291de..6e15ae3248e0 100644 >--- a/mm/migrate.c >+++ b/mm/migrate.c >@@ -901,10 +901,10 @@ out: > } > > /* >- * gcc-4.7.3 on arm gets an ICE when inlining unmap_and_move(). Work around >+ * gcc 4.7 and 4.8 on arm gets an ICE when inlining unmap_and_move(). Work around > * it. > */ >-#if GCC_VERSION == 40703 && defined(CONFIG_ARM) >+#if (GCC_VERSION >= 40700 && GCC_VERSION < 40900) && defined(CONFIG_ARM) > #define ICE_noinline noinline > #else > #define ICE_noinline > >_______________________________________________ >linux-arm-kernel mailing list >linux-arm-kernel@lists.infradead.org >http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- 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/