raid1 new read balance, first test, some doubt, can anyone help?

raid1 new read balance, first test, some doubt, can anyone help?

am 05.02.2011 06:38:22 von Roberto Spadim

hi i make a read balance select (via sysfs), could anyone help me to debug it?
the new/old code is located at:
http://www.spadim.com.br/raid1/
it's kernel 2.6.37 based

=============================================
i don't know if exist a function at per mirror bio queue that return
the sum of write sectors, sum of read sectors, the first and last
sector position in queue
if anyone know please help me, i will use it at
line: 510 raid1.new.c
time_based_current_queue_time = 0;

all information is in the same line

=============================================
i don't know how to read information per mirror
for example, at raid1.h
i have some variables:
int head_distance_rate; /* used by time based,
time=(this_sector - head_position) * head_distance_rate */
int read_sectors_rate; /* used by time based,
time=sectors * read_sectors_rate */
int write_sectors_rate; /* used by time
based, time=sectors * write_byte_rate */

i would make it per mirror, for example:

/sys/block/md0/md/sda1_head_distance_rate -> head_distance_rate
/sys/block/md0/md/sda1_read_sectors_rate -> read_sectors_rate
/sys/block/md0/md/sda1_write_sectors_rate -> write_sectors_rate

anyone know how to do it?
how could i compile the raid1.c and raid1.h to test?
my today raid1 is a module at my current kernel, but i couldn't (i
don't know how) compile it and use :/ it's my first kernel driver :)
hehe



--
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid1 new read balance, first test, some doubt, can anyone help?

am 05.02.2011 12:44:36 von Keld Simonsen

Hi Roberto

Just a little advice:

IMHO raid1 is old technology, you should rather look at the raid10
driver, which can do the same as raid1, but also do some other stuff.

best regards
keld


On Sat, Feb 05, 2011 at 03:38:22AM -0200, Roberto Spadim wrote:
> hi i make a read balance select (via sysfs), could anyone help me to debug it?
> the new/old code is located at:
> http://www.spadim.com.br/raid1/
> it's kernel 2.6.37 based
>
> =============================================
> i don't know if exist a function at per mirror bio queue that return
> the sum of write sectors, sum of read sectors, the first and last
> sector position in queue
> if anyone know please help me, i will use it at
> line: 510 raid1.new.c
> time_based_current_queue_time = 0;
>
> all information is in the same line
>
> =============================================
> i don't know how to read information per mirror
> for example, at raid1.h
> i have some variables:
> int head_distance_rate; /* used by time based,
> time=(this_sector - head_position) * head_distance_rate */
> int read_sectors_rate; /* used by time based,
> time=sectors * read_sectors_rate */
> int write_sectors_rate; /* used by time
> based, time=sectors * write_byte_rate */
>
> i would make it per mirror, for example:
>
> /sys/block/md0/md/sda1_head_distance_rate -> head_distance_rate
> /sys/block/md0/md/sda1_read_sectors_rate -> read_sectors_rate
> /sys/block/md0/md/sda1_write_sectors_rate -> write_sectors_rate
>
> anyone know how to do it?
> how could i compile the raid1.c and raid1.h to test?
> my today raid1 is a module at my current kernel, but i couldn't (i
> don't know how) compile it and use :/ it's my first kernel driver :)
> hehe
>
>
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid1 new read balance, first test, some doubt, can anyone help?

am 05.02.2011 15:38:20 von Roberto Spadim

i saw, raid10 have layout that raid1 don't have
but for ssd i don't need layout, it don't have high access time
my test is just for read_balance function if it work there, should
work with raid10 too

2011/2/5 Keld J=F8rn Simonsen :
> Hi Roberto
>
> Just a little advice:
>
> IMHO raid1 is old technology, you should rather look at the raid10
> driver, which can do the same as raid1, but also do some other stuff.
>
> best regards
> keld
>
>
> On Sat, Feb 05, 2011 at 03:38:22AM -0200, Roberto Spadim wrote:
>> hi i make a read balance select (via sysfs), could anyone help me to=
debug it?
>> the new/old code is located at:
>> http://www.spadim.com.br/raid1/
>> it's kernel 2.6.37 based
>>
>> ==================== ===3D=
==================== ==
>> i don't know if exist a function at per mirror bio queue that return
>> the sum of write sectors, sum of read sectors, the first and last
>> sector position in queue
>> if anyone know please help me, i will use it at
>> line: 510 raid1.new.c
>> time_based_current_queue_time =3D 0;
>>
>> all information is in the same line
>>
>> ==================== ===3D=
==================== ==
>> i don't know how to read information per mirror
>> for example, at raid1.h
>> i have some variables:
>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 head_distance_rate; =A0 =
=A0 /* used by time based,
>> time=3D(this_sector - head_position) * head_distance_rate */
>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 read_sectors_rate; =A0 =A0=
=A0/* used by time based,
>> time=3Dsectors * read_sectors_rate */
>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 write_sectors_rate; =A0 =
=A0 =A0 =A0/* used by time
>> based, time=3Dsectors * write_byte_rate =A0 */
>>
>> i would make it per mirror, for example:
>>
>> /sys/block/md0/md/sda1_head_distance_rate -> head_distance_rate
>> /sys/block/md0/md/sda1_read_sectors_rate -> read_sectors_rate
>> /sys/block/md0/md/sda1_write_sectors_rate -> write_sectors_rate
>>
>> anyone know how to do it?
>> how could i compile the raid1.c and raid1.h to test?
>> my today raid1 is a module at my current kernel, but i couldn't (i
>> don't know how) compile it and use :/ it's my first kernel driver :)
>> hehe
>>
>>
>>
>> --
>> Roberto Spadim
>> Spadim Technology / SPAEmpresarial
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid=
" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid"=
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>



--=20
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid1 new read balance, first test, some doubt, can anyone help?

am 05.02.2011 15:46:03 von Roberto Spadim

raid1 have write-behind, raid10 use it?

2011/2/5 Roberto Spadim :
> i saw, raid10 have layout that raid1 don't have
> but for ssd i don't need layout, it don't have high access time
> my test is just for read_balance function if it work there, should
> work with raid10 too
>
> 2011/2/5 Keld J=F8rn Simonsen :
>> Hi Roberto
>>
>> Just a little advice:
>>
>> IMHO raid1 is old technology, you should rather look at the raid10
>> driver, which can do the same as raid1, but also do some other stuff=

>>
>> best regards
>> keld
>>
>>
>> On Sat, Feb 05, 2011 at 03:38:22AM -0200, Roberto Spadim wrote:
>>> hi i make a read balance select (via sysfs), could anyone help me t=
o debug it?
>>> the new/old code is located at:
>>> http://www.spadim.com.br/raid1/
>>> it's kernel 2.6.37 based
>>>
>>> ==================== ===3D=
==================== ==
>>> i don't know if exist a function at per mirror bio queue that retur=
n
>>> the sum of write sectors, sum of read sectors, the first and last
>>> sector position in queue
>>> if anyone know please help me, i will use it at
>>> line: 510 raid1.new.c
>>> time_based_current_queue_time =3D 0;
>>>
>>> all information is in the same line
>>>
>>> ==================== ===3D=
==================== ==
>>> i don't know how to read information per mirror
>>> for example, at raid1.h
>>> i have some variables:
>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 head_distance_rate; =A0=
=A0 /* used by time based,
>>> time=3D(this_sector - head_position) * head_distance_rate */
>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 read_sectors_rate; =A0 =
=A0 =A0/* used by time based,
>>> time=3Dsectors * read_sectors_rate */
>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 write_sectors_rate; =A0=
=A0 =A0 =A0/* used by time
>>> based, time=3Dsectors * write_byte_rate =A0 */
>>>
>>> i would make it per mirror, for example:
>>>
>>> /sys/block/md0/md/sda1_head_distance_rate -> head_distance_rate
>>> /sys/block/md0/md/sda1_read_sectors_rate -> read_sectors_rate
>>> /sys/block/md0/md/sda1_write_sectors_rate -> write_sectors_rate
>>>
>>> anyone know how to do it?
>>> how could i compile the raid1.c and raid1.h to test?
>>> my today raid1 is a module at my current kernel, but i couldn't (i
>>> don't know how) compile it and use :/ it's my first kernel driver :=
)
>>> hehe
>>>
>>>
>>>
>>> --
>>> Roberto Spadim
>>> Spadim Technology / SPAEmpresarial
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rai=
d" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.htm=
l
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid=
" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
>



--=20
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid1 new read balance, first test, some doubt, can anyone help?

am 05.02.2011 16:12:00 von Roberto Spadim

i was looking sysfs
how could i put more files?
at:
/sys/block/md0/md/rd0/
/sys/block/md0/md/rd1/
/sys/block/md0/md/rd<9999>/

2011/2/5 Roberto Spadim :
> raid1 have write-behind, raid10 use it?
>
> 2011/2/5 Roberto Spadim :
>> i saw, raid10 have layout that raid1 don't have
>> but for ssd i don't need layout, it don't have high access time
>> my test is just for read_balance function if it work there, should
>> work with raid10 too
>>
>> 2011/2/5 Keld J=F8rn Simonsen :
>>> Hi Roberto
>>>
>>> Just a little advice:
>>>
>>> IMHO raid1 is old technology, you should rather look at the raid10
>>> driver, which can do the same as raid1, but also do some other stuf=
f.
>>>
>>> best regards
>>> keld
>>>
>>>
>>> On Sat, Feb 05, 2011 at 03:38:22AM -0200, Roberto Spadim wrote:
>>>> hi i make a read balance select (via sysfs), could anyone help me =
to debug it?
>>>> the new/old code is located at:
>>>> http://www.spadim.com.br/raid1/
>>>> it's kernel 2.6.37 based
>>>>
>>>> ==================== ===
==================== ===3D
>>>> i don't know if exist a function at per mirror bio queue that retu=
rn
>>>> the sum of write sectors, sum of read sectors, the first and last
>>>> sector position in queue
>>>> if anyone know please help me, i will use it at
>>>> line: 510 raid1.new.c
>>>> time_based_current_queue_time =3D 0;
>>>>
>>>> all information is in the same line
>>>>
>>>> ==================== ===
==================== ===3D
>>>> i don't know how to read information per mirror
>>>> for example, at raid1.h
>>>> i have some variables:
>>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 head_distance_rate; =A0=
=A0 /* used by time based,
>>>> time=3D(this_sector - head_position) * head_distance_rate */
>>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 read_sectors_rate; =A0=
=A0 =A0/* used by time based,
>>>> time=3Dsectors * read_sectors_rate */
>>>> =A0 =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 write_sectors_rate; =A0=
=A0 =A0 =A0/* used by time
>>>> based, time=3Dsectors * write_byte_rate =A0 */
>>>>
>>>> i would make it per mirror, for example:
>>>>
>>>> /sys/block/md0/md/sda1_head_distance_rate -> head_distance_rate
>>>> /sys/block/md0/md/sda1_read_sectors_rate -> read_sectors_rate
>>>> /sys/block/md0/md/sda1_write_sectors_rate -> write_sectors_rate
>>>>
>>>> anyone know how to do it?
>>>> how could i compile the raid1.c and raid1.h to test?
>>>> my today raid1 is a module at my current kernel, but i couldn't (i
>>>> don't know how) compile it and use :/ it's my first kernel driver =
:)
>>>> hehe
>>>>
>>>>
>>>>
>>>> --
>>>> Roberto Spadim
>>>> Spadim Technology / SPAEmpresarial
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-ra=
id" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.ht=
ml
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rai=
d" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.htm=
l
>>>
>>
>>
>>
>> --
>> Roberto Spadim
>> Spadim Technology / SPAEmpresarial
>>
>
>
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
>



--=20
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html