Skip to contentSkip to conversation

ia64: Align rse_clear_invalid to double-bundle boundary.

PATCH In review David Mosberger 3 participants 8 messages Jan 19, 2005 – Jan 25, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: Align rse_clear_invalid to double-bundle boundary.

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

	--david

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet

#   2005/01/18 17:38:56-08:00 [email protected] 
#   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 [email protected] +1 -0
# (rse_clear_invalid): Align it to 32 bytes.
#

arch/ia64/kernel/entry.S +1 -0
diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
@@ -971,6 +971,7 @@
 	shladd in0=loc1,3,r17
 	mov in1=0
 	;;
+	.align 32
 rse_clear_invalid:
 #ifdef CONFIG_ITANIUM
 	// cycle 0
#1 lore raw
Quoted 28 lines

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

	--david

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/01/18 17:38:56-08:00 [email protected]
# 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 [email protected] +1 -0
# (rse_clear_invalid): Align it to 32 bytes.
#
diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S

arch/ia64/kernel/entry.S +1 -0
@@ -971,6 +971,7 @@
 	shladd in0=loc1,3,r17
 	mov in1=0
 	;;
+	.align 32

rse_clear_invalid:

Quoted 3 lines
#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

#2 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony

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
#3 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony

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

Quoted 4 lines

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

#4 lore raw
In reply to David Mosberger
Quoted 8 lines

David Mosberger wrote on Tuesday, January 25, 2005 12:42 PM

Quoted 4 lines

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

#5 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony

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
#6 lore raw
In reply to David Mosberger
Quoted 3 lines

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

#7 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony

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