linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lina.iyer@linaro.org (Lina Iyer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3
Date: Thu, 2 Apr 2015 13:12:30 -0600	[thread overview]
Message-ID: <20150402191230.GA24219@linaro.org> (raw)
In-Reply-To: <7hwq1v4iq4.fsf@deeprootsystems.com>

On Wed, Apr 01 2015 at 15:57 -0600, Kevin Hilman wrote:
>Andrew Morton <akpm@linux-foundation.org> writes:
>
>> On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <marc.zyngier@arm.com> 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 at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2015-04-02 19:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24  0:45 Possible regression in next-20150323 due to "ARM, arm64: kvm: get rid of the bounce page" Simon Horman
2015-03-24  0:52 ` Tyler Baker
2015-03-24  0:53   ` Tyler Baker
2015-03-24  8:31 ` Ard Biesheuvel
2015-03-24 16:13   ` Nishanth Menon
2015-03-26  0:39     ` Simon Horman
2015-03-26 13:36       ` Will Deacon
2015-03-26 15:29         ` Tyler Baker
2015-03-27  0:25           ` Simon Horman
2015-03-27 10:06             ` Will Deacon
2015-03-27 11:55               ` Simon Horman
2015-03-27 15:18               ` Tyler Baker
2015-03-31 18:58               ` Kevin Hilman
2015-03-31 21:39                 ` Ard Biesheuvel
2015-03-31 22:10                   ` Kevin Hilman
2015-04-01  9:37                     ` [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3 (was: Re: Possible regression in gcc 4.7.3 next-20150323 due to "ARM, arm64: kvm: get rid of the bounce page") Geert Uytterhoeven
2015-04-01  9:47                       ` [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3 Marc Zyngier
2015-04-01 19:40                         ` Andrew Morton
2015-04-01 21:54                           ` Kevin Hilman
2015-04-01 21:59                             ` Russell King - ARM Linux
2015-04-02  7:17                               ` Geert Uytterhoeven
2015-04-02 19:12                             ` Lina Iyer [this message]
2015-04-02 21:12                               ` Kevin Hilman
2015-04-02 21:53                                 ` Lina Iyer
2015-04-07 17:57                             ` Kevin Hilman
2015-04-07 20:17                               ` Andrew Morton
2015-04-07 22:41                                 ` Kevin Hilman
2015-04-07 22:53                                   ` Andrew Morton
2015-04-07 23:27                                     ` Kevin Hilman
2015-04-07 23:36                                       ` Andrew Morton
2015-04-08  0:15                                         ` Kevin Hilman
2015-04-01 19:27                       ` Kevin Hilman
2015-04-01  8:58                 ` Possible regression in next-20150323 due to "ARM, arm64: kvm: get rid of the bounce page" Will Deacon
2015-04-01 13:54                   ` Nishanth Menon
2015-04-01 18:12                   ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402191230.GA24219@linaro.org \
    --to=lina.iyer@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).