mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Renames par3z to parz.
This commit is contained in:
parent
22b3ca77b3
commit
b6c93cd61b
9 changed files with 59 additions and 59 deletions
14
cpu.h
14
cpu.h
|
|
@ -201,13 +201,13 @@ static inline int cpu_has_slowpshufb(void)
|
|||
* PAR2 mmx 1160 [MB/s]
|
||||
* PAR2 sse2 2082 [MB/s]
|
||||
* PAR2 sse2ext 2481 [MB/s]
|
||||
* PAR3z int32 236 [MB/s]
|
||||
* PAR3z int64 456 [MB/s]
|
||||
* PAR3z mmx 576 [MB/s]
|
||||
* PAR3z sse2 1109 [MB/s]
|
||||
* PAR3z sse2ext 1527 [MB/s]
|
||||
* PAR3z ssse3 931 [MB/s] (slower than sse2ext)
|
||||
* PAR3z ssse3ext 932 [MB/s] (slower than sse2ext)
|
||||
* PARz int32 236 [MB/s]
|
||||
* PARz int64 456 [MB/s]
|
||||
* PARz mmx 576 [MB/s]
|
||||
* PARz sse2 1109 [MB/s]
|
||||
* PARz sse2ext 1527 [MB/s]
|
||||
* PARz ssse3 931 [MB/s] (slower than sse2ext)
|
||||
* PARz ssse3ext 932 [MB/s] (slower than sse2ext)
|
||||
* PAR4z int32 144 [MB/s]
|
||||
* PAR4z int64 271 [MB/s]
|
||||
* PAR4z mmx 431 [MB/s]
|
||||
|
|
|
|||
44
raid.c
44
raid.c
|
|
@ -172,7 +172,7 @@
|
|||
* the Cauchy matrix if SSSE3 is present.
|
||||
*
|
||||
* int8 int32 int64 sse2 sse2e ssse3 ssse3e
|
||||
* par3z 2112 3118 9589 10304
|
||||
* parz 2112 3118 9589 10304
|
||||
*
|
||||
*
|
||||
* In conclusion, the use of power coefficients, and specifically powers
|
||||
|
|
@ -590,9 +590,9 @@ void raid_par2_sse2ext(unsigned char** vbuf, unsigned data, unsigned size)
|
|||
#endif
|
||||
|
||||
/*
|
||||
* PAR3z (triple parity with powers of 2^-1) 32bit C implementation
|
||||
* PARz (triple parity with powers of 2^-1) 32bit C implementation
|
||||
*/
|
||||
void raid_par3z_int32(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
void raid_parz_int32(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
{
|
||||
unsigned char* p;
|
||||
unsigned char* q;
|
||||
|
|
@ -640,9 +640,9 @@ void raid_par3z_int32(unsigned char** vbuf, unsigned data, unsigned size)
|
|||
}
|
||||
|
||||
/*
|
||||
* PAR3z (triple parity with powers of 2^-1) 64bit C implementation
|
||||
* PARz (triple parity with powers of 2^-1) 64bit C implementation
|
||||
*/
|
||||
void raid_par3z_int64(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
void raid_parz_int64(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
{
|
||||
unsigned char* p;
|
||||
unsigned char* q;
|
||||
|
|
@ -691,9 +691,9 @@ void raid_par3z_int64(unsigned char** vbuf, unsigned data, unsigned size)
|
|||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/*
|
||||
* PAR3z (triple parity with powers of 2^-1) SSE2 implementation
|
||||
* PARz (triple parity with powers of 2^-1) SSE2 implementation
|
||||
*/
|
||||
void raid_par3z_sse2(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
void raid_parz_sse2(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
{
|
||||
unsigned char* p;
|
||||
unsigned char* q;
|
||||
|
|
@ -746,11 +746,11 @@ void raid_par3z_sse2(unsigned char** vbuf, unsigned data, unsigned size)
|
|||
|
||||
#if defined(__x86_64__)
|
||||
/*
|
||||
* PAR3z (triple parity with powers of 2^-1) SSE2 implementation
|
||||
* PARz (triple parity with powers of 2^-1) SSE2 implementation
|
||||
*
|
||||
* Note that it uses 16 registers, meaning that x64 is required.
|
||||
*/
|
||||
void raid_par3z_sse2ext(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
void raid_parz_sse2ext(unsigned char** vbuf, unsigned data, unsigned size)
|
||||
{
|
||||
unsigned char* p;
|
||||
unsigned char* q;
|
||||
|
|
@ -2078,7 +2078,7 @@ void raid_set(unsigned mode)
|
|||
/* internal forwarder */
|
||||
static void (*raid_par1_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_par2_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_par3z_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_parz_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_par3_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_par4_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
static void (*raid_par5_ptr)(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
|
|
@ -2093,7 +2093,7 @@ void raid_par(unsigned level, unsigned char** vbuf, unsigned data, unsigned size
|
|||
if (raid_mode == RAID_MODE_CAUCHY)
|
||||
raid_par3_ptr(vbuf, data, size);
|
||||
else
|
||||
raid_par3z_ptr(vbuf, data, size);
|
||||
raid_parz_ptr(vbuf, data, size);
|
||||
break;
|
||||
case 4 : raid_par4_ptr(vbuf, data, size); break;
|
||||
case 5 : raid_par5_ptr(vbuf, data, size); break;
|
||||
|
|
@ -2825,11 +2825,11 @@ void raid_init(void)
|
|||
if (sizeof(void*) == 4) {
|
||||
raid_par1_ptr = raid_par1_int32;
|
||||
raid_par2_ptr = raid_par2_int32;
|
||||
raid_par3z_ptr = raid_par3z_int32;
|
||||
raid_parz_ptr = raid_parz_int32;
|
||||
} else {
|
||||
raid_par1_ptr = raid_par1_int64;
|
||||
raid_par2_ptr = raid_par2_int64;
|
||||
raid_par3z_ptr = raid_par3z_int64;
|
||||
raid_parz_ptr = raid_parz_int64;
|
||||
}
|
||||
|
||||
raid_rec1_ptr = raid_rec1_int8;
|
||||
|
|
@ -2842,14 +2842,14 @@ void raid_init(void)
|
|||
#if defined(__x86_64__)
|
||||
if (cpu_has_slowextendedreg()) {
|
||||
raid_par2_ptr = raid_par2_sse2;
|
||||
raid_par3z_ptr = raid_par3z_sse2;
|
||||
raid_parz_ptr = raid_parz_sse2;
|
||||
} else {
|
||||
raid_par2_ptr = raid_par2_sse2ext;
|
||||
raid_par3z_ptr = raid_par3z_sse2ext;
|
||||
raid_parz_ptr = raid_parz_sse2ext;
|
||||
}
|
||||
#else
|
||||
raid_par2_ptr = raid_par2_sse2;
|
||||
raid_par3z_ptr = raid_par3z_sse2;
|
||||
raid_parz_ptr = raid_parz_sse2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -2884,8 +2884,8 @@ static struct raid_func {
|
|||
{ "int64", raid_par1_int64 },
|
||||
{ "int32", raid_par2_int32 },
|
||||
{ "int64", raid_par2_int64 },
|
||||
{ "int32", raid_par3z_int32 },
|
||||
{ "int64", raid_par3z_int64 },
|
||||
{ "int32", raid_parz_int32 },
|
||||
{ "int64", raid_parz_int64 },
|
||||
{ "int8", raid_rec1_int8 },
|
||||
{ "int8", raid_rec2_int8 },
|
||||
{ "int8", raid_recX_int8 },
|
||||
|
|
@ -2893,7 +2893,7 @@ static struct raid_func {
|
|||
#if defined(__i386__) || defined(__x86_64__)
|
||||
{ "sse2", raid_par1_sse2 },
|
||||
{ "sse2", raid_par2_sse2 },
|
||||
{ "sse2", raid_par3z_sse2 },
|
||||
{ "sse2", raid_parz_sse2 },
|
||||
{ "ssse3", raid_par3_ssse3 },
|
||||
{ "ssse3", raid_par4_ssse3 },
|
||||
{ "ssse3", raid_par5_ssse3 },
|
||||
|
|
@ -2905,7 +2905,7 @@ static struct raid_func {
|
|||
|
||||
#if defined(__x86_64__)
|
||||
{ "sse2e", raid_par2_sse2ext },
|
||||
{ "sse2e", raid_par3z_sse2ext },
|
||||
{ "sse2e", raid_parz_sse2ext },
|
||||
{ "ssse3e", raid_par3_ssse3ext },
|
||||
{ "ssse3e", raid_par4_ssse3ext },
|
||||
{ "ssse3e", raid_par5_ssse3ext },
|
||||
|
|
@ -2935,9 +2935,9 @@ const char* raid_par2_tag(void)
|
|||
return raid_tag(raid_par2_ptr);
|
||||
}
|
||||
|
||||
const char* raid_par3z_tag(void)
|
||||
const char* raid_parz_tag(void)
|
||||
{
|
||||
return raid_tag(raid_par3z_ptr);
|
||||
return raid_tag(raid_parz_ptr);
|
||||
}
|
||||
|
||||
const char* raid_par3_tag(void)
|
||||
|
|
|
|||
10
raid.h
10
raid.h
|
|
@ -108,7 +108,7 @@ void raid_rec(unsigned level, const int* d, const int* c, unsigned char** vbuf,
|
|||
*/
|
||||
const char* raid_par1_tag(void);
|
||||
const char* raid_par2_tag(void);
|
||||
const char* raid_par3z_tag(void);
|
||||
const char* raid_parz_tag(void);
|
||||
const char* raid_par3_tag(void);
|
||||
const char* raid_par4_tag(void);
|
||||
const char* raid_par5_tag(void);
|
||||
|
|
@ -128,10 +128,10 @@ void raid_par2_int32(unsigned char** vbuf, unsigned data, unsigned size);
|
|||
void raid_par2_int64(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par2_sse2(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par2_sse2ext(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3z_int32(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3z_int64(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3z_sse2(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3z_sse2ext(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_parz_int32(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_parz_int64(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_parz_sse2(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_parz_sse2ext(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3_int8(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3_ssse3(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
void raid_par3_ssse3ext(unsigned char** vbuf, unsigned data, unsigned size);
|
||||
|
|
|
|||
|
|
@ -282,12 +282,12 @@ static void gentest(unsigned mode, unsigned diskmax, unsigned block_size)
|
|||
#endif
|
||||
} else {
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
map[mac++] = raid_par3z_int32;
|
||||
map[mac++] = raid_par3z_int64;
|
||||
map[mac++] = raid_parz_int32;
|
||||
map[mac++] = raid_parz_int64;
|
||||
if (cpu_has_sse2()) {
|
||||
map[mac++] = raid_par3z_sse2;
|
||||
map[mac++] = raid_parz_sse2;
|
||||
#if defined(__x86_64__)
|
||||
map[mac++] = raid_par3z_sse2ext;
|
||||
map[mac++] = raid_parz_sse2ext;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -788,13 +788,13 @@ Leaving the parity disk reserved for only this file ensures that
|
|||
it doesn\(cqt get fragmented, improving the performance.
|
||||
.PP
|
||||
This option is mandatory and it can be used only one time.
|
||||
.SS [q,2,3,4,5,6]\-parity FILE
|
||||
.SS [2,3,4,5,6]\-parity FILE
|
||||
Defines the files to use to store extra parity information.
|
||||
For each parity file specified, one additional level of protection
|
||||
is enabled:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
q\-parity/2\-parity enables RAID6 double parity
|
||||
2\-parity enables RAID6 double parity.
|
||||
.IP \(bu
|
||||
3\-parity enables triple parity
|
||||
.IP \(bu
|
||||
|
|
|
|||
18
snapraid.txt
18
snapraid.txt
|
|
@ -638,18 +638,18 @@ it doesn't get fragmented, improving the performance.
|
|||
|
||||
This option is mandatory and it can be used only one time.
|
||||
|
||||
7.2 [q,r,s,t,u]-parity FILE
|
||||
7.2 [2,3,4,5,6]-parity FILE
|
||||
---------------------------
|
||||
|
||||
Defines the files to use to store extra parity information.
|
||||
For each parity file specified, one additional level of protection
|
||||
is enabled:
|
||||
|
||||
* q-parity enables RAID6 double parity
|
||||
* r-parity enables triple parity
|
||||
* s-parity enables quad parity
|
||||
* t-parity enables penta (five) parity
|
||||
* u-parity enables hexa (six) parity
|
||||
* 2-parity enables RAID6 double parity.
|
||||
* 3-parity enables triple parity
|
||||
* 4-parity enables quad parity
|
||||
* 5-parity enables penta (five) parity
|
||||
* 6-parity enables hexa (six) parity
|
||||
|
||||
Each parity level requires also all the files of the previous levels.
|
||||
|
||||
|
|
@ -665,7 +665,7 @@ These options are optional and they can be used only one time.
|
|||
|
||||
Defines an alternate file and format to store the triple parity.
|
||||
|
||||
This option is an alternative at 'r-parity' mainly intended for
|
||||
This option is an alternative at '3-parity' mainly intended for
|
||||
low end CPUs like ARM or AMD Phenom, Athlon and Opteron that don't
|
||||
support the SSSE3 instructions set, and in such case it may provide
|
||||
a better performance.
|
||||
|
|
@ -673,11 +673,11 @@ a better performance.
|
|||
This format is similar at the one used by the Linux Kernel RAID6 and
|
||||
ZFS RAIDZ3, but it doesn't work beyond triple parity.
|
||||
|
||||
When using 'r-parity' you will be warned if it's recommended to use
|
||||
When using '3-parity' you will be warned if it's recommended to use
|
||||
the 'z-parity' format for a performance improvment.
|
||||
|
||||
It's possible to convert from one format to another, adjusting
|
||||
the configuraton file with the wanted z-parity or r-parity file,
|
||||
the configuraton file with the wanted z-parity or 3-parity file,
|
||||
and using 'fix' to recreate it.
|
||||
|
||||
7.4 content FILE
|
||||
|
|
|
|||
14
speed.c
14
speed.c
|
|
@ -328,22 +328,22 @@ void speed(void)
|
|||
#endif
|
||||
printf("\n");
|
||||
|
||||
/* PAR3z */
|
||||
printf("%8s", "par3z");
|
||||
printf("%8s", raid_par3z_tag());
|
||||
/* PARz */
|
||||
printf("%8s", "parz");
|
||||
printf("%8s", raid_parz_tag());
|
||||
fflush(stdout);
|
||||
|
||||
printf("%8s", "");
|
||||
|
||||
SPEED_START {
|
||||
raid_par3z_int32(buffer, diskmax, block_size);
|
||||
raid_parz_int32(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8"PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
|
||||
SPEED_START {
|
||||
raid_par3z_int64(buffer, diskmax, block_size);
|
||||
raid_parz_int64(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8"PRIu64, ds / dt);
|
||||
|
|
@ -352,7 +352,7 @@ void speed(void)
|
|||
#if defined(__i386__) || defined(__x86_64__)
|
||||
if (cpu_has_sse2()) {
|
||||
SPEED_START {
|
||||
raid_par3z_sse2(buffer, diskmax, block_size);
|
||||
raid_parz_sse2(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8"PRIu64, ds / dt);
|
||||
|
|
@ -360,7 +360,7 @@ void speed(void)
|
|||
|
||||
#if defined(__x86_64__)
|
||||
SPEED_START {
|
||||
raid_par3z_sse2ext(buffer, diskmax, block_size);
|
||||
raid_parz_sse2ext(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8"PRIu64, ds / dt);
|
||||
|
|
|
|||
2
state.c
2
state.c
|
|
@ -61,7 +61,7 @@ const char* lev_raid_name(unsigned mode, unsigned n)
|
|||
case 3 : if (mode == RAID_MODE_CAUCHY)
|
||||
return "par3";
|
||||
else
|
||||
return "par3z";
|
||||
return "parz";
|
||||
case 4 : return "par4";
|
||||
case 5 : return "par5";
|
||||
case 6 : return "par6";
|
||||
|
|
|
|||
4
util.c
4
util.c
|
|
@ -1362,13 +1362,13 @@ void* malloc_nofail_align(size_t size, void** freeptr)
|
|||
*
|
||||
* PAR1 sse2x4 21936 [MB/s]
|
||||
* PAR2 sse2x2 11902 [MB/s]
|
||||
* PAR3z sse2x1 5838 [MB/s]
|
||||
* PARz sse2x1 5838 [MB/s]
|
||||
*
|
||||
* Without displacement:
|
||||
*
|
||||
* PAR1 sse2x4 15368 [MB/s]
|
||||
* PAR2 sse2x2 6814 [MB/s]
|
||||
* PAR3z sse2x1 3033 [MB/s]
|
||||
* PARz sse2x1 3033 [MB/s]
|
||||
*/
|
||||
#define MALLOC_DISPLACEMENT (7*256)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue