Skip to contentSkip to conversation

fs hang in 2.6.27.y | Fwd: [Bug 15658] New: [PATCH] x86 constant_test_bit() prone to misoptimization with gcc-4.4

PATCH Michael Shigorin 4 participants 7 messages Aug 27, 2010 – Sep 27, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,
I was told that lkml is still highly preferred over bugzilla, so reposting the bugreport here.

The problem first manifested as "ext3 hang" in 2.6.27 based kernel; the cause appeared to be somewhat more involved, see the analysis below. hpa@ confirmed he's seen similar problems elsewhere.

This has been worked around in mainline since but our folks consider the fix potentially broken and propose the real one (this seems to have not been fixed for -stable, not sure; the patch is for 2.6.27.y).

PS: please CC me, not on the list [yet] -- and rather a proxy than a developer. Thanks in advance.

----- Forwarded message from bugzilla-daemon/bugzilla.kernel.org -----

Date: Tue, 6 Jul 2010 11:38:15 GMT
From: bugzilla-daemon/bugzilla.kernel.org
To: shigorin/gmail.com
Subject: [Bug 15658] New: [PATCH] x86 constant_test_bit() prone to misoptimization with gcc-4.4

https://bugzilla.kernel.org/show_bug.cgi?id=15658

AssignedTo: platform_x86_64/kernel-bugs.osdl.org
CC: greg/kroah.com, vsu/altlinux.org, mingo/elte.hu

Created an attachment (id=25776)
--> (https://bugzilla.kernel.org/attachment.cgi?id=25776)
bluntly drop overcasting instead of fiddling with gcc's sense of humour

While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4 misoptimization of constant_test_bit() when 'const volatile unsigned long *addr' cast to 'unsigned long *' with subsequent unconditional jump to pause (and not to the test) leading to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined constant_test_bit() and correct jump.

Other arches than asm-x86 (it's include/asm-x86/bitops.h) may implement this slightly differently; 2.6.29 mitigates the misoptimization by changing the function prototype (commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue itself would be better.

Here's my translation of original analysis which led to the above conclusion (Russian text in internal bugzilla; I'm no kernel hacker so take it with grain of salt and blame me, not them):

---
Gory details
============

Slightly simplified bit_spin_lock() main part:
-------------------include/linux/bit_spinlock.h-----------------------

static inline void bit_spin_lock(int bitnum, unsigned long *addr)

{
        <...>
        while (test_and_set_bit_lock(bitnum, addr)) {
                while (test_bit(bitnum, addr)) {
                        <...>
                        cpu_relax();
                        <...>
                }
        }
        <...>
}

----------------------------------------------------------------------

Outer loop is an attempt to set the needed bit in atomic manner. If the bit was already set, inner loop waits to reset it and so forth.

Assembly code generated by gcc-4.4 for the internal loop:
----------------------------------------------------------------------

$ rpm2cpio kernel-image-tmc-srv-2.6.27-tmc24.x86_64.rpm | cpio -idmv *jbd.ko
<...>
$ cd ./lib/modules/2.6.27-tmc-srv-tmc24/kernel/fs/jbd/
$ objdump -d --no-show-raw-insn jbd.ko | grep -A92 "<journal_get_undo_access>:"
| tail -7
    240a:       mov    %rbx,%rsi
    240d:       mov    $0x16,%edi
    2412:       callq  30 <constant_test_bit>
    2417:       test   %eax,%eax
    2419:       je     2328 <journal_get_undo_access+0x48>
    241f:       pause
    2421:       jmp    241f <journal_get_undo_access+0x13f>
----------------------------------------------------------------------

Offsets:
240a, 240d - preparing arguments (bit no. 32, bitmap address in rsi) 2412 - call to constant_test_bit()
2417 - returned value test
2419 - break if 0
241f - otherwise pause and then
2421 - unconditional jump *but* not to the test but to the pause

Thus endless loop. That is, in C equivalent:
----------------------------------------------------------------------
static inline void bit_spin_lock(int bitnum, unsigned long *addr)

{
        <...>
        while (test_and_set_bit_lock(bitnum, addr)) {
                if (test_bit(bitnum, addr))
                        while (1)
                                cpu_relax();
        }
        <...>
}

----------------------------------------------------------------------

When using gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING kernel configuration parameter constant_test_bit() function gets inlined and the unconditional jump in the inner loop goes before condition test as it should.

It is worth mentioning that bit_spin_lock() is used in several places and not all of them result in wrong code being generated. For example, end_buffer_async_read() has no problem with the inner loop:
----------------------------------------------------------------------

$ rpm2cpio kernel-modules-oprofile-tmc-srv-2.6.27-tmc24.x86_64.rpm | cpio -idmv
*vmlinux
<...>
$ cd ./lib/modules/2.6.27-tmc-srv-tmc24/
$ objdump -d --no-show-raw-insn vmlinux | grep -A106 "<end_buffer_async_read>:"
| tail -7
ffffffff802f55e2:       mov    %r13,%rsi
ffffffff802f55e5:       mov    $0x4,%edi
ffffffff802f55ea:       callq  ffffffff802f4360 <constant_test_bit>
ffffffff802f55ef:       test   %eax,%eax
ffffffff802f55f1:       je     ffffffff802f54f9 <end_buffer_async_read+0x49>
ffffffff802f55f7:       pause
ffffffff802f55f9:       jmp    ffffffff802f55e2 <end_buffer_async_read+0x132>
----------------------------------------------------------------------

Hang scenario
=============
The below is my take at what leads from the above problem to the "hung" system state observed.

1. At some moment the process changing the filesystem tries to "lock" struct buffer_head by means of bit_spin_lock() but fails at first and then goes to internal loop to wait for the buffer being freed.

2. Due to the problem described above the wait comes a bit long.

3. kjournald kernel thread wakes (because current transaction times out or gets oversized) to commit the transaction into on-disk journal. But upon changing it to T_LOCKED state kjournald notices that not all atomic operations on the transactions are complete. Thus it cannot continue and goes to sleep (in journal_commit_transaction()). Of course, it waits for the process looping indefinitely as described in (1).

4. Subsequent filesystem change requests result in a new active (T_RUNNING) transaction. As free space in that transaction ends up, all the processes trying to change the filesystem march to sleep until kjournald would commit that transaction. But it's not done with the previous one yet as in (3).

And so it all "hangs".

Solutions
=========
IMHO it looks very much like a bug in gcc-4.4. Adding 'volatile' qualifier to the datatype of the data addressed by the second parameter to bit_spin_lock() doesn't help. Maybe there's an upstream fix. Maybe it gets fixed by some flags. Disabling CONFIG_OPTIMIZE_INLINING does help. gcc-4.3 does compile things right, at least for JBD. Maybe there are other possibilities... not me to judge.
---

I wasn't able to find anything similar upon a /quick/ google search, so posting a new bug.

These folks from Massive Computing worked on this one:
* Volodymyr G. Lukiianyk (volodymyrgl/gmail.com) -- analysis
* Alexander Chumachenko (ledest/gmail.com) -- pin-up and fix

--- Comment #1 from Michael Shigorin <shigorin/gmail.com> 2010-07-06 11:38:07 --- ping

--- Comment #2 from H. Peter Anvin <[email protected]> 2010-07-06 23:01:48 --- I have seen in other contexts that gcc 4.4 seems to mishandle "const volatile".

----- End forwarded message -----

Signature · 2 lines
 ---- WBR, Michael Shigorin <[email protected]>
  ------ Linux.Kiev http://www.linux.kiev.ua/

From ef5e7cca16541bd0d9fb36d13c7e40c6ecc4fd77 Mon Sep 17 00:00:00 2001
From: Led <[email protected]>
Date: Wed, 31 Mar 2010 21:09:20 +0300
Subject: [PATCH] x86: avoid 'constant_test_bit()' misoptimization due to cast to non-volatile

While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4 misoptimization of constant_test_bit() when 'const volatile unsigned long *addr' cast to 'unsigned long *' with subsequent unconditional jump to pause (and not to the test) leading to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined constant_test_bit() and correct jump.

Other arches than asm-x86 may implement this slightly differently; 2.6.29 mitigates the misoptimization by changing the function prototype (commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue itself is better.

---
 include/asm-x86/bitops.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-x86/bitops.h +1 -1
index cfb2b64..89352ed 100644
@@ -295,7 +295,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
 static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
 {
 	return ((1UL << (nr % BITS_PER_LONG)) &
-		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+		(addr[nr / BITS_PER_LONG])) != 0;
 }
 
 static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
Signature · 1 line
1.7.0.3
#1 lore raw

(huge quote)

Quoted 180 lines · On Sat, 28 Aug 2010 00:36:29 +0300 Michael Shigorin <[email protected]> wrote:

Hello,
I was told that lkml is still highly preferred over bugzilla, so reposting the bugreport here.

The problem first manifested as "ext3 hang" in 2.6.27 based kernel; the cause appeared to be somewhat more involved, see the analysis below. hpa@ confirmed he's seen similar problems elsewhere.

This has been worked around in mainline since but our folks consider the fix potentially broken and propose the real one (this seems to have not been fixed for -stable, not sure; the patch is for 2.6.27.y).

PS: please CC me, not on the list [yet] -- and rather a proxy than a developer. Thanks in advance.

----- Forwarded message from bugzilla-daemon/bugzilla.kernel.org -----

Date: Tue, 6 Jul 2010 11:38:15 GMT
From: bugzilla-daemon/bugzilla.kernel.org
To: shigorin/gmail.com
Subject: [Bug 15658] New: [PATCH] x86 constant_test_bit() prone to misoptimization with gcc-4.4

https://bugzilla.kernel.org/show_bug.cgi?id=15658

AssignedTo: platform_x86_64/kernel-bugs.osdl.org
CC: greg/kroah.com, vsu/altlinux.org, mingo/elte.hu

Created an attachment (id=25776)
--> (https://bugzilla.kernel.org/attachment.cgi?id=25776)
bluntly drop overcasting instead of fiddling with gcc's sense of humour

While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4 misoptimization of constant_test_bit() when 'const volatile unsigned long *addr' cast to 'unsigned long *' with subsequent unconditional jump to pause (and not to the test) leading to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined constant_test_bit() and correct jump.

Other arches than asm-x86 (it's include/asm-x86/bitops.h) may implement this slightly differently; 2.6.29 mitigates the misoptimization by changing the function prototype (commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue itself would be better.

Here's my translation of original analysis which led to the above conclusion (Russian text in internal bugzilla; I'm no kernel hacker so take it with grain of salt and blame me, not them):

---
Gory details
============

Slightly simplified bit_spin_lock() main part:
-------------------include/linux/bit_spinlock.h-----------------------

static inline void bit_spin_lock(int bitnum, unsigned long *addr)

{
        <...>
        while (test_and_set_bit_lock(bitnum, addr)) {
                while (test_bit(bitnum, addr)) {
                        <...>
                        cpu_relax();
                        <...>
                }
        }
        <...>
}

----------------------------------------------------------------------

Outer loop is an attempt to set the needed bit in atomic manner. If the bit was already set, inner loop waits to reset it and so forth.

Assembly code generated by gcc-4.4 for the internal loop:
----------------------------------------------------------------------

$ rpm2cpio kernel-image-tmc-srv-2.6.27-tmc24.x86_64.rpm | cpio -idmv *jbd.ko
<...>
$ cd ./lib/modules/2.6.27-tmc-srv-tmc24/kernel/fs/jbd/
$ objdump -d --no-show-raw-insn jbd.ko | grep -A92 "<journal_get_undo_access>:"
| tail -7
    240a:       mov    %rbx,%rsi
    240d:       mov    $0x16,%edi
    2412:       callq  30 <constant_test_bit>
    2417:       test   %eax,%eax
    2419:       je     2328 <journal_get_undo_access+0x48>
    241f:       pause
    2421:       jmp    241f <journal_get_undo_access+0x13f>
----------------------------------------------------------------------

Offsets:
240a, 240d - preparing arguments (bit no. 32, bitmap address in rsi) 2412 - call to constant_test_bit()
2417 - returned value test
2419 - break if 0
241f - otherwise pause and then
2421 - unconditional jump *but* not to the test but to the pause

Thus endless loop. That is, in C equivalent:
----------------------------------------------------------------------
static inline void bit_spin_lock(int bitnum, unsigned long *addr)

{
        <...>
        while (test_and_set_bit_lock(bitnum, addr)) {
                if (test_bit(bitnum, addr))
                        while (1)
                                cpu_relax();
        }
        <...>
}

----------------------------------------------------------------------

When using gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING kernel configuration parameter constant_test_bit() function gets inlined and the unconditional jump in the inner loop goes before condition test as it should.

It is worth mentioning that bit_spin_lock() is used in several places and not all of them result in wrong code being generated. For example, end_buffer_async_read() has no problem with the inner loop:
----------------------------------------------------------------------

$ rpm2cpio kernel-modules-oprofile-tmc-srv-2.6.27-tmc24.x86_64.rpm | cpio -idmv
*vmlinux
<...>
$ cd ./lib/modules/2.6.27-tmc-srv-tmc24/
$ objdump -d --no-show-raw-insn vmlinux | grep -A106 "<end_buffer_async_read>:"
| tail -7
ffffffff802f55e2:       mov    %r13,%rsi
ffffffff802f55e5:       mov    $0x4,%edi
ffffffff802f55ea:       callq  ffffffff802f4360 <constant_test_bit>
ffffffff802f55ef:       test   %eax,%eax
ffffffff802f55f1:       je     ffffffff802f54f9 <end_buffer_async_read+0x49>
ffffffff802f55f7:       pause
ffffffff802f55f9:       jmp    ffffffff802f55e2 <end_buffer_async_read+0x132>
----------------------------------------------------------------------

Hang scenario
=============
The below is my take at what leads from the above problem to the "hung" system state observed.

1. At some moment the process changing the filesystem tries to "lock" struct buffer_head by means of bit_spin_lock() but fails at first and then goes to internal loop to wait for the buffer being freed.

2. Due to the problem described above the wait comes a bit long.

3. kjournald kernel thread wakes (because current transaction times out or gets oversized) to commit the transaction into on-disk journal. But upon changing it to T_LOCKED state kjournald notices that not all atomic operations on the transactions are complete. Thus it cannot continue and goes to sleep (in journal_commit_transaction()). Of course, it waits for the process looping indefinitely as described in (1).

4. Subsequent filesystem change requests result in a new active (T_RUNNING) transaction. As free space in that transaction ends up, all the processes trying to change the filesystem march to sleep until kjournald would commit that transaction. But it's not done with the previous one yet as in (3).

And so it all "hangs".

Solutions
=========
IMHO it looks very much like a bug in gcc-4.4. Adding 'volatile' qualifier to the datatype of the data addressed by the second parameter to bit_spin_lock() doesn't help. Maybe there's an upstream fix. Maybe it gets fixed by some flags. Disabling CONFIG_OPTIMIZE_INLINING does help. gcc-4.3 does compile things right, at least for JBD. Maybe there are other possibilities... not me to judge.
---

I wasn't able to find anything similar upon a /quick/ google search, so posting a new bug.

These folks from Massive Computing worked on this one:
* Volodymyr G. Lukiianyk (volodymyrgl/gmail.com) -- analysis
* Alexander Chumachenko (ledest/gmail.com) -- pin-up and fix

Quoted 6 lines

--- Comment #1 from Michael Shigorin <shigorin/gmail.com> 2010-07-06 11:38:07 --- ping

--- Comment #2 from H. Peter Anvin <[email protected]> 2010-07-06 23:01:48 --- I have seen in other contexts that gcc 4.4 seems to mishandle "const volatile".

Working around a gcc-4.4 bug is a good thing, and the patch cleans the code up anyway - is there a reason for casting away the `volatile const'?

AFAICT, that typecast was added by 26996dd22b3cbc9db ("x86: change bitwise operations to get a void parameter") which changed the x86 bitops to take a void* address. But we later changed them all to take a long* but forgot to revert that typecast.

I changed the patch cosmetics a bit, see below.

We don't have a Signed-off-by: for this patch - it would be good to have one, please. We should at least have yours, as you sent the patch.

Also, we prefer to have real names in kernel commits. Does "Led" refer to Alexander Chumachenko?

Thanks.

From: Led <[email protected]>

While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4 misoptimization of constant_test_bit() when 'const volatile unsigned long *addr' cast to 'unsigned long *' with subsequent unconditional jump to pause (and not to the test) leading to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined constant_test_bit() and correct jump.

Other arches than asm-x86 may implement this slightly differently; 2.6.29 mitigates the misoptimization by changing the function prototype in commit c4295fbb6048 ("x86: make 'constant_test_bit()' take an unsigned bit number") but probably fixing the issue itself is better.

Cc Michael Shigorin <[email protected]>
Cc Volodymyr G. Lukiianyk <[email protected]>
Cc Alexander Chumachenko <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Linus Torvalds <[email protected]>

---

 arch/x86/include/asm/bitops.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/include/asm/bitops.h renamed from arch/x86/include/asm/bitops.h~x86-avoid-constant_test_bit-misoptimization-due-to-cast-to-non-volatile +1 -2
diff -puN arch/x86/include/asm/bitops.h~x86-avoid-constant_test_bit-misoptimization-due-to-cast-to-non-volatile arch/x86/include/asm/bitops.h
@@ -308,8 +308,7 @@ static inline int test_and_change_bit(in
 
 static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
 {
-	return ((1UL << (nr % BITS_PER_LONG)) &
-		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+	return ((1UL << (nr % BITS_PER_LONG)) & addr[nr / BITS_PER_LONG]) != 0;
 }
 
 static inline int variable_test_bit(int nr, volatile const unsigned long *addr)

_

#2 lore raw
Quoted 1 line · Andrew Morton

(huge quote)

Andrew, huge THANKS for getting to this!

Quoted 3 lines

Working around a gcc-4.4 bug is a good thing, and the patch cleans the code up anyway - is there a reason for casting away the `volatile const'?

We'll discuss this; I'm actually no kernel developer (a silly local iso9660 patch in 1999, nothing more) but rather a proxy.

Quoted 3 lines

We don't have a Signed-off-by: for this patch - it would be good to have one, please. We should at least have yours, as you sent the patch.

OK, Greg already told us to do so for stable@ but things were busy there as well. We'll fix up.

Quoted 2 lines

Also, we prefer to have real names in kernel commits. Does "Led" refer to Alexander Chumachenko?

Yes.

2 led: a signed-off patch, please? :)

Signature · 2 lines
 ---- WBR, Michael Shigorin <[email protected]>
  ------ Linux.Kiev http://www.linux.kiev.ua/
#3 lore raw
In reply to Andrew Morton
Quoted 2 lines · Andrew Morton

Working around a gcc-4.4 bug is a good thing, and the patch cleans the code up anyway - is there a reason for casting away the `volatile const'?

It turned out that I translated the original assumption of _gcc_ fault (from our bugzilla) when the latter conclusion was that it was correctly optimizing the code given that addr wasn't marked as volatile. My fault, sorry; fixed the commit comment this time.

Quoted 4 lines

I changed the patch cosmetics a bit, see below.
We don't have a Signed-off-by: for this patch - it would be good to have one, please. We should at least have yours, as you sent the patch.

The simplicity of adding that somewhat went over my head -- please find attached the corrected original patch against HEAD with Signed-off-by: for both of us. led@ didn't change cosmetics -- thanks for providing it anyways.

Quoted 2 lines

Also, we prefer to have real names in kernel commits. Does "Led" refer to Alexander Chumachenko?

(just in case) Yes.

Signature · 2 lines
 ---- WBR, Michael Shigorin <[email protected]>
  ------ Linux.Kiev http://www.linux.kiev.ua/

From 70e6a20b3720e522633f4b791f2f35e817d7ced3 Mon Sep 17 00:00:00 2001
From: Led <[email protected]>
Date: Thu, 1 Apr 2010 15:34:52 +0300
Subject: [PATCH] x86: avoid 'constant_test_bit()' misoptimization due to cast to non-volatile

While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4 misoptimization of non-inlined constant_test_bit() due to non-volatile addr when 'const volatile unsigned long *addr' cast to 'unsigned long *' with subsequent unconditional jump to pause (and not to the test) leading to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined constant_test_bit() and correct jump, thus working around the kernel bug.

Other arches than asm-x86 may implement this slightly differently; 2.6.29 mitigates the misoptimization by changing the function prototype (commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue itself is better.

---
 arch/x86/include/asm/bitops.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/bitops.h +1 -1
index 545776e..bafd80d 100644
@@ -309,7 +309,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
 static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
 {
 	return ((1UL << (nr % BITS_PER_LONG)) &
-		(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
+		(addr[nr / BITS_PER_LONG])) != 0;
 }
 
 static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
Signature · 1 line
1.7.2.3
#4 lore raw
Quoted 5 lines · Michael Shigorin

The simplicity of adding that somewhat went over my head -- please find attached the corrected original patch against HEAD with Signed-off-by: for both of us.  led@ didn't change cosmetics -- thanks for providing it anyways.

Ok, I think this patch is probably the right thing to do at this stage
- and we should think about trying to see if we can improve code generation later.

So: "Acked-by: Linus Torvalds <[email protected]>"

Ingo/Thomas/Peter - I can take this either from the x86 tree, or directly. Just let me know. Or do you have any alternate suggestions that would be appropriate?

Linus

#5 lore raw

I'll check it when I get back home this evening and assuming it's Ok will push it to you.

Quoted 19 lines · Linus Torvalds
Quoted 5 lines · Michael Shigorin

The simplicity of adding that somewhat went over my head -- please find attached the corrected original patch against HEAD with Signed-off-by: for both of us.  led@ didn't change cosmetics -- thanks for providing it anyways.

Ok, I think this patch is probably the right thing to do at this stage
- and we should think about trying to see if we can improve code generation later.

So: "Acked-by: Linus Torvalds <[email protected]>"

Ingo/Thomas/Peter - I can take this either from the x86 tree, or directly. Just let me know. Or do you have any alternate suggestions that would be appropriate?

Linus

Signature · 1 line
Sent from my mobile phone.  Please pardon any lack of formatting.
#6 lore raw
In reply to Linus Torvalds
Quoted 11 lines · Linus Torvalds
Quoted 5 lines · Michael Shigorin

The simplicity of adding that somewhat went over my head -- please find attached the corrected original patch against HEAD with Signed-off-by: for both of us. led@ didn't change cosmetics -- thanks for providing it anyways.

Ok, I think this patch is probably the right thing to do at this stage
- and we should think about trying to see if we can improve code generation later.

Quoted 6 lines

So: "Acked-by: Linus Torvalds<[email protected]>"

Ingo/Thomas/Peter - I can take this either from the x86 tree, or directly. Just let me know. Or do you have any alternate suggestions that would be appropriate?

(Back home now)

Yes, this patch is clearly The Right Thing. I'll add it to the -tip tree and assuming no unexpected problems will send you a pull request tomorrow.

-hpa