Skip to contentSkip to conversation

2.4 PATCH: gcc 3.3 support

PATCH H. J. Lu 3 participants 7 messages Aug 6, 2003 – Aug 7, 2003

lore
Share & tools
lore

H. J. Lu

author
#0 lore raw
Quoted 5 lines · Bjorn Helgaas
Quoted 4 lines · H. J. Lu

I am using gcc 3.3 to build the ia64 2.4 kernel from

http://lia64.bkbits.net/linux-ia64-2.4

Quoted 9 lines
Quoted 2 lines

Gcc 3.3 doesn't like multi-line asm statement. I am enclosing a patch here.

In 2.6, the asm statement was moved into a .S file. I'd rather see a 2.4 patch that does the same thing.

Also, gcc 3.3.1 was unable to build a stable kernel when I released the 2.4.21 ia64 patch. So use it at your own risk.

This is the patch backed ported from 2.6 kernel. However, I got

# modprobe xor
raid5: measuring checksumming speed
   ia64      :    81.920 MB/sec

The old one I got

# modprobe xor
raid5: measuring checksumming speed
   8regs     :  1769.472 MB/sec
   8regs_prefetch:  1753.088 MB/sec
   32regs    :  2064.384 MB/sec
   32regs_prefetch:  2064.384 MB/sec
   ia64      :  2441.216 MB/sec
raid5: using function: ia64 (2441.216 MB/sec)

It is very strange.

H.J.
-----

arch/ia64/kernel/ia64_ksyms.c renamed from arch/ia64/kernel/ia64_ksyms.c.gcc-3.3 +12 -0
@@ -141,6 +141,18 @@ EXPORT_SYMBOL_NOVERS(__udivdi3);
 EXPORT_SYMBOL_NOVERS(__moddi3);
 EXPORT_SYMBOL_NOVERS(__umoddi3);
 
+#if defined(CONFIG_MD_RAID5) || defined(CONFIG_MD_RAID5_MODULE)
+extern void xor_ia64_2(void);
+extern void xor_ia64_3(void);
+extern void xor_ia64_4(void);
+extern void xor_ia64_5(void);
+
+EXPORT_SYMBOL_NOVERS(xor_ia64_2);
+EXPORT_SYMBOL_NOVERS(xor_ia64_3);
+EXPORT_SYMBOL_NOVERS(xor_ia64_4);
+EXPORT_SYMBOL_NOVERS(xor_ia64_5);
+#endif
+
 extern unsigned long ia64_iobase;
 EXPORT_SYMBOL(ia64_iobase);
 
arch/ia64/lib/Makefile renamed from arch/ia64/lib/Makefile.gcc-3.3 +7 -0
@@ -16,6 +16,10 @@ obj-y := __divsi3.o __udivsi3.o __modsi3
 	flush.o ip_fast_csum.o io.o do_csum.o						\
 	memset.o strlen.o swiotlb.o
 
+ifdef CONFIG_MD_RAID5
+obj-y += xor.o
+endif
+
 obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
 obj-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
 
@@ -48,4 +52,7 @@ __modsi3.o: idiv32.S
 __umodsi3.o: idiv32.S
 	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $<
 
+xor.o: xor.S
+	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $<
+
 include $(TOPDIR)/Rules.make
arch/ia64/lib/xor.S renamed from arch/ia64/lib/xor.S.gcc-3.3 +184 -0

184 lines not on this page · raw message

include/asm-ia64/xor.h renamed from include/asm-ia64/xor.h.gcc-3.3 +1 -259

275 lines not on this page · raw message

#1 lore raw
Quoted 17 lines · H. J. Lu

This is the patch backed ported from 2.6 kernel. However, I got

# modprobe xor
raid5: measuring checksumming speed
   ia64      :    81.920 MB/sec

The old one I got

# modprobe xor
raid5: measuring checksumming speed
   8regs     :  1769.472 MB/sec
   8regs_prefetch:  1753.088 MB/sec
   32regs    :  2064.384 MB/sec
   32regs_prefetch:  2064.384 MB/sec
   ia64      :  2441.216 MB/sec
raid5: using function: ia64 (2441.216 MB/sec)
Quoted 1 line

It is very strange.

That *is* very strange. I'll wait to apply the patch until we understand what's happening. Have you tried the 2.6 kernel to see what speeds it measures?

Bjorn

author
#2 lore raw
In reply to H. J. Lu
Quoted 18 lines · Bjorn Helgaas
Quoted 17 lines · H. J. Lu

This is the patch backed ported from 2.6 kernel. However, I got

# modprobe xor
raid5: measuring checksumming speed
   ia64      :    81.920 MB/sec

The old one I got

# modprobe xor
raid5: measuring checksumming speed
   8regs     :  1769.472 MB/sec
   8regs_prefetch:  1753.088 MB/sec
   32regs    :  2064.384 MB/sec
   32regs_prefetch:  2064.384 MB/sec
   ia64      :  2441.216 MB/sec
raid5: using function: ia64 (2441.216 MB/sec)
Quoted 5 lines
Quoted 1 line

It is very strange.

That *is* very strange. I'll wait to apply the patch until we understand what's happening. Have you tried the 2.6 kernel to see what speeds it measures?

I have a bigsur. Last time when I tried, it didn't boot for me. I will try it again with my acpi patch.

H.J.

author
#3 lore raw
In reply to H. J. Lu
Quoted 6 lines · Bjorn Helgaas
Quoted 5 lines · H. J. Lu

This is the patch backed ported from 2.6 kernel. However, I got

# modprobe xor
raid5: measuring checksumming speed
   ia64      :    81.920 MB/sec

This number was under heavy load. I got

Aug  6 09:03:38 gnu-2 kernel: raid5: measuring checksumming speed
Aug  6 09:03:38 gnu-2 kernel:    ia64      :    98.304 MB/sec
Aug  6 09:03:38 gnu-2 kernel: raid5: using function: ia64 (98.304 MB/sec)

with 2.4 kernel when machine was idle.

Quoted 12 lines
Quoted 12 lines

The old one I got

# modprobe xor
raid5: measuring checksumming speed
   8regs     :  1769.472 MB/sec
   8regs_prefetch:  1753.088 MB/sec
   32regs    :  2064.384 MB/sec
   32regs_prefetch:  2064.384 MB/sec
   ia64      :  2441.216 MB/sec
raid5: using function: ia64 (2441.216 MB/sec)
Quoted 5 lines
Quoted 1 line

It is very strange.

That *is* very strange. I'll wait to apply the patch until we understand what's happening. Have you tried the 2.6 kernel to see what speeds it measures?

With 2.6.0-test2, I got

raid5: measuring checksumming speed
ia64 : 98.304 MB/sec
raid5: using function: ia64 (98.304 MB/sec)

It looks like a separate asm file hurt the number very badly.

H.J.

#4 lore raw
In reply to H. J. Lu
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H. J. Lu
Quoted 5 lines · Bjorn Helgaas
Quoted 5 lines

On Wednesday 06 August 2003 9:44 am, H. J. Lu wrote: > This is the patch backed ported from 2.6 kernel. However, I got

Quoted 1 line
# modprobe xor > raid5: measuring checksumming speed > ia64 :

81.920 MB/sec

H> This number was under heavy load. I got

H> Aug 6 09:03:38 gnu-2 kernel: raid5: measuring checksumming speed H> Aug 6 09:03:38 gnu-2 kernel: ia64 : 98.304 MB/sec Aug 6 09:03:38 H> gnu-2 kernel: raid5: using function: ia64 (98.304 MB/sec)

H> with 2.4 kernel when machine was idle.

I can't reproduce this. With 2.6.0-test2 on a zx6000, I get:

raid5: measuring checksumming speed
ia64 : 2080.768 MB/sec
raid5: using function: ia64 (2080.768 MB/sec)

	--david
author
#5 lore raw
In reply to H. J. Lu
Quoted 15 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H. J. Lu
Quoted 5 lines · Bjorn Helgaas
Quoted 5 lines

On Wednesday 06 August 2003 9:44 am, H. J. Lu wrote: > This is the patch backed ported from 2.6 kernel. However, I got

Quoted 1 line
# modprobe xor > raid5: measuring checksumming speed > ia64 :

81.920 MB/sec

H> This number was under heavy load. I got

H> Aug 6 09:03:38 gnu-2 kernel: raid5: measuring checksumming speed H> Aug 6 09:03:38 gnu-2 kernel: ia64 : 98.304 MB/sec Aug 6 09:03:38 H> gnu-2 kernel: raid5: using function: ia64 (98.304 MB/sec)

Quoted 8 lines

H> with 2.4 kernel when machine was idle.

I can't reproduce this. With 2.6.0-test2 on a zx6000, I get:

raid5: measuring checksumming speed
ia64 : 2080.768 MB/sec
raid5: using function: ia64 (2080.768 MB/sec)

Mine is bigsur. I will try old 2.4.2x kernel to see what number I will get. It may be just that bigsur has very poor performance on xor.

H.J.

author
#6 lore raw
In reply to H. J. Lu
Quoted 20 lines · H. J. Lu
Quoted 19 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H. J. Lu
Quoted 5 lines · Bjorn Helgaas
Quoted 5 lines

On Wednesday 06 August 2003 9:44 am, H. J. Lu wrote: > This is the patch backed ported from 2.6 kernel. However, I got

Quoted 1 line
# modprobe xor > raid5: measuring checksumming speed > ia64 :

81.920 MB/sec

H> This number was under heavy load. I got

H> Aug 6 09:03:38 gnu-2 kernel: raid5: measuring checksumming speed H> Aug 6 09:03:38 gnu-2 kernel: ia64 : 98.304 MB/sec Aug 6 09:03:38 H> gnu-2 kernel: raid5: using function: ia64 (98.304 MB/sec)

H> with 2.4 kernel when machine was idle.

I can't reproduce this. With 2.6.0-test2 on a zx6000, I get:

Quoted 9 lines
Quoted 4 lines

raid5: measuring checksumming speed
ia64 : 2080.768 MB/sec
raid5: using function: ia64 (2080.768 MB/sec)

Mine is bigsur. I will try old 2.4.2x kernel to see what number I will get. It may be just that bigsur has very poor performance on xor.

I have verified that removing the separate xor boosts the performance to

Aug  7 09:39:43 gnu-2 kernel: raid5: measuring checksumming speed
Aug  7 09:39:43 gnu-2 kernel:    8regs     :   753.664 MB/sec
Aug  7 09:39:43 gnu-2 kernel:    8regs_prefetch:   786.432 MB/sec
Aug  7 09:39:43 gnu-2 kernel:    32regs    :  1359.872 MB/sec
Aug  7 09:39:43 gnu-2 kernel:    32regs_prefetch:  1310.720 MB/sec
Aug  7 09:39:43 gnu-2 kernel:    ia64      :  1982.464 MB/sec
Aug  7 09:39:43 gnu-2 kernel: raid5: using function: ia64 (1982.464 MB/sec)

on bigsur.

H.J.