Skip to contentSkip to conversation

Fun with RAID

parisc-linux Matthew Wilcox 3 participants 3 messages Feb 4, 2001 – Feb 5, 2001

lore
Share & tools
lore
#0 lore raw

As some of you will have noticed, the current Head branch, as well as enabling lots of strange and curious segfaults also enables Software Raid. I suspect someone with the time & inclination will eventaully write some optimised XOR functions for PA-RISC, but in the meantime, we shall use the generic C functions.

There are two functions to choose from, and the code does this at boottime. One is optimised for processors with 8 registers, and the other for processors with 32 registers. The 32regs one uses 8 registers, interleaving loads, xors, and stores. The 8regs function just dumbly loads, xors and stores for each word.

So, just for fun, let's see how they stack up. Here's results from a 712 (PCX/L CPU):

raid5: measuring checksumming speed
8regs : 60.960 MB/sec
32regs : 107.442 MB/sec

and here's a C200+ (PCX/U+ CPU):

   8regs     :   421.386 MB/sec
   32regs    :   531.876 MB/sec

which is as you would expect, but i have a vague recollection that grant said the 8regs was the faster code on the A500.

[thanks to Ryan for the C200+ result]

Signature · 1 line
Revolutions do not require corporate support.
#1 lore raw
Quoted 5 lines · Matthew Wilcox

As some of you will have noticed, the current Head branch, as well as enabling lots of strange and curious segfaults also enables Software Raid. I suspect someone with the time & inclination will eventaully write some optimised XOR functions for PA-RISC, but in the meantime, we shall use the generic C functions.

I've pointed out to Matthew that using speculative loads (for PA2.0) would help to preload cachelines.

Quoted 7 lines

So, just for fun, let's see how they stack up. Here's results from a 712 (PCX/L CPU):

raid5: measuring checksumming speed
8regs : 60.960 MB/sec
32regs : 107.442 MB/sec

Quoted 7 lines

and here's a C200+ (PCX/U+ CPU):

   8regs     :   421.386 MB/sec
   32regs    :   531.876 MB/sec

which is as you would expect, but i have a vague recollection that grant said the 8regs was the faster code on the A500.

Yeah. I've had both:

   8regs     :  2091.309 MB/sec
   32regs    :  2266.569 MB/sec

and

   8regs     :  2090.928 MB/sec
   32regs    :  1637.157 MB/sec

The first was from an NFS boot.
The second from the same vmlinux booted from local SCSI disk. Don't ask me. I don't know why the difference.

On C3000 (same 64-bit kernel again):

   8regs     :  1900.809 MB/sec
   32regs    :  1799.082 MB/sec

and again with 32-bit on same C3000:

   8regs     :   950.214 MB/sec
   32regs    :   937.260 MB/sec

Both c3k results were using NFS root and "head".

grant

Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253

#2 lore raw
Quoted 2 lines

I've pointed out to Matthew that using speculative loads (for PA2.0) would help to preload cachelines.

On the x86 athlon boxes it helps massively for memcpy performance too as a lot of our page copies are not cache->cache. The other place Arjan found was a big win which isnt yet mainstream is prefetching task structs in the scheduler