public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
@ 2005-01-19  4:58 David Mosberger
  2005-01-25 20:36 ` Luck, Tony
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: David Mosberger @ 2005-01-19  4:58 UTC (permalink / raw)
  To: linux-ia64

Trivial patch: align rse_clear_invalid to 32-byte boundary.  Good for
a 9 cycle speed up.

	--david

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/18 17:38:56-08:00 davidm@tiger.hpl.hp.com 
#   ia64: Align rse_clear_invalid to double-bundle boundary.  Improves (normal)
#   	getpid() from 284 to 275 cycles.
# 
# arch/ia64/kernel/entry.S
#   2005/01/18 17:38:40-08:00 davidm@tiger.hpl.hp.com +1 -0
#   (rse_clear_invalid): Align it to 32 bytes.
# 
diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
--- a/arch/ia64/kernel/entry.S	2005-01-18 20:57:18 -08:00
+++ b/arch/ia64/kernel/entry.S	2005-01-18 20:57:18 -08:00
@@ -971,6 +971,7 @@
 	shladd in0=loc1,3,r17
 	mov in1=0
 	;;
+	.align 32
 rse_clear_invalid:
 #ifdef CONFIG_ITANIUM
 	// cycle 0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
@ 2005-01-25 20:36 ` Luck, Tony
  2005-01-25 20:41 ` David Mosberger
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luck, Tony @ 2005-01-25 20:36 UTC (permalink / raw)
  To: linux-ia64

>Trivial patch: align rse_clear_invalid to 32-byte boundary.  Good for
>a 9 cycle speed up.
>
>	--david
>
>Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
>
># This is a BitKeeper generated diff -Nru style patch.
>#
># ChangeSet
>#   2005/01/18 17:38:56-08:00 davidm@tiger.hpl.hp.com 
>#   ia64: Align rse_clear_invalid to double-bundle boundary.  
>Improves (normal)
>#   	getpid() from 284 to 275 cycles.
># 
># arch/ia64/kernel/entry.S
>#   2005/01/18 17:38:40-08:00 davidm@tiger.hpl.hp.com +1 -0
>#   (rse_clear_invalid): Align it to 32 bytes.
># 
>diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
>--- a/arch/ia64/kernel/entry.S	2005-01-18 20:57:18 -08:00
>+++ b/arch/ia64/kernel/entry.S	2005-01-18 20:57:18 -08:00
>@@ -971,6 +971,7 @@
> 	shladd in0=loc1,3,r17
> 	mov in1=0
> 	;;
>+	.align 32
> rse_clear_invalid:
> #ifdef CONFIG_ITANIUM
> 	// cycle 0
>

I've had reports from Ken Chen and Bjorn Helgaas of illegal instruction
traps in the kernel while booting.  Backing out this patch makes the
problem go away.

Bjorn was using "defconfig".  Not sure what Ken used.  I haven't seen any
such problems using tiger_defconfig, nor with defconfig on my tiger.

-Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
  2005-01-25 20:36 ` Luck, Tony
@ 2005-01-25 20:41 ` David Mosberger
  2005-01-25 21:15 ` Chen, Kenneth W
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: David Mosberger @ 2005-01-25 20:41 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 25 Jan 2005 12:36:51 -0800, "Luck, Tony" <tony.luck@intel.com> said:

  Tony> I've had reports from Ken Chen and Bjorn Helgaas of illegal instruction
  Tony> traps in the kernel while booting.  Backing out this patch makes the
  Tony> problem go away.

  Tony> Bjorn was using "defconfig".  Not sure what Ken used.  I
  Tony> haven't seen any such problems using tiger_defconfig, nor with
  Tony> defconfig on my tiger.

Oh, I should have used TEXT_ALIGN(32) instead of .align 32, since
.align inside a function was broken for a long time.

Bjorn, Ken, does that fix your problem?

	--david

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
  2005-01-25 20:36 ` Luck, Tony
  2005-01-25 20:41 ` David Mosberger
@ 2005-01-25 21:15 ` Chen, Kenneth W
  2005-01-25 21:52 ` Luck, Tony
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chen, Kenneth W @ 2005-01-25 21:15 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 25 Jan 2005 12:36:51 -0800, "Luck, Tony" <tony.luck@intel.com> said:
  Tony> I've had reports from Ken Chen and Bjorn Helgaas of illegal instruction
  Tony> traps in the kernel while booting.  Backing out this patch makes the
  Tony> problem go away.

  Tony> Bjorn was using "defconfig".  Not sure what Ken used.  I
  Tony> haven't seen any such problems using tiger_defconfig, nor with
  Tony> defconfig on my tiger.

David Mosberger wrote on Tuesday, January 25, 2005 12:42 PM
> Oh, I should have used TEXT_ALIGN(32) instead of .align 32, since
> .align inside a function was broken for a long time.
>
> Bjorn, Ken, does that fix your problem?


Yes, that fixes my problem.

- Ken



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
                   ` (2 preceding siblings ...)
  2005-01-25 21:15 ` Chen, Kenneth W
@ 2005-01-25 21:52 ` Luck, Tony
  2005-01-25 21:56 ` David Mosberger
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luck, Tony @ 2005-01-25 21:52 UTC (permalink / raw)
  To: linux-ia64

>David Mosberger wrote on Tuesday, January 25, 2005 12:42 PM
>> Oh, I should have used TEXT_ALIGN(32) instead of .align 32, since
>> .align inside a function was broken for a long time.
>>
>> Bjorn, Ken, does that fix your problem?
>
>
>Yes, that fixes my problem.

So I switched over to TEXT_ALIGN(32) instead of ".align", but the
speedup seems to have gone away (using TEXT_ALIGN is 6 cycles slower
than ".align").

-Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
                   ` (3 preceding siblings ...)
  2005-01-25 21:52 ` Luck, Tony
@ 2005-01-25 21:56 ` David Mosberger
  2005-01-25 22:03 ` Luck, Tony
  2005-01-25 22:19 ` David Mosberger
  6 siblings, 0 replies; 8+ messages in thread
From: David Mosberger @ 2005-01-25 21:56 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 25 Jan 2005 13:52:09 -0800, "Luck, Tony" <tony.luck@intel.com> said:

  Tony> So I switched over to TEXT_ALIGN(32) instead of ".align", but the
  Tony> speedup seems to have gone away (using TEXT_ALIGN is 6 cycles slower
  Tony> than ".align").

Probably a sign that your assembler needs to be upgraded?
Or are you saying the speedup goes away even though HAVE_WORKING_TEXT_ALIGN
is defined?

	--david

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
                   ` (4 preceding siblings ...)
  2005-01-25 21:56 ` David Mosberger
@ 2005-01-25 22:03 ` Luck, Tony
  2005-01-25 22:19 ` David Mosberger
  6 siblings, 0 replies; 8+ messages in thread
From: Luck, Tony @ 2005-01-25 22:03 UTC (permalink / raw)
  To: linux-ia64

>Probably a sign that your assembler needs to be upgraded?
>Or are you saying the speedup goes away even though 
>HAVE_WORKING_TEXT_ALIGN is defined?

This is using the tool chain on SLES9.  I ran the preprocessor
over entry.S, and it does include the ".align 32" ... so the
change should have had no effect.  Which means that something
else I did today probably dropped the cycles :-(

-Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch] ia64: Align rse_clear_invalid to double-bundle boundary.
  2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
                   ` (5 preceding siblings ...)
  2005-01-25 22:03 ` Luck, Tony
@ 2005-01-25 22:19 ` David Mosberger
  6 siblings, 0 replies; 8+ messages in thread
From: David Mosberger @ 2005-01-25 22:19 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 25 Jan 2005 14:03:08 -0800, "Luck, Tony" <tony.luck@intel.com> said:

  Tony> This is using the tool chain on SLES9.  I ran the preprocessor
  Tony> over entry.S, and it does include the ".align 32" ... so the
  Tony> change should have had no effect.  Which means that something
  Tony> else I did today probably dropped the cycles :-(

I believe the exact data-cache layout can affect the basic
syscall-path quite significantly.  Thus, I can certainly see why
apparently unrelated changes could affect the syscall path.  Getting
better control over the data-layout would be nice (Ken's GP-relative
addressing work may a helpful step in that direction).

	--david

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-25 22:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-19  4:58 [patch] ia64: Align rse_clear_invalid to double-bundle boundary David Mosberger
2005-01-25 20:36 ` Luck, Tony
2005-01-25 20:41 ` David Mosberger
2005-01-25 21:15 ` Chen, Kenneth W
2005-01-25 21:52 ` Luck, Tony
2005-01-25 21:56 ` David Mosberger
2005-01-25 22:03 ` Luck, Tony
2005-01-25 22:19 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox