md new raid read balance, i need help to end this new feature -queue block informations

From: Roberto Spadim
Date: Tue Feb 15 2011 - 22:01:42 EST



hi guys, i´m making a new read_balance function for md (linux software raid) can anyone help me?
i need informations about queue of each mirror (/dev/sda, /dev/nbd, /dev/hda, /dev/XXX = block devices)
what information?
estimate time to end queue commands

why? with estimate time i can select the best mirror (raid1) to read, the time with less queue time + less read time, is the best disk to read

i know there´s some elevators and some devices that don´t work with queue, or have user space queue that is dificult to get estimate value
in this case i want:
total sectors to write (sequencial/non sequencial if possible)
total sectors to read (sequencial/non sequencial if possible)
first and last sector number (to get disk position change time, i´m considering that elevator get the smallest patch, so the last-first is the head distance, head distance * distance/sector give me a good estimation value)

i think that´s all

in raid1.c i have the generic_make_request() call, can i get all informations with those parameters?

sorry i´m from brazil if i wrote something out of order, or difficult to understand please report it.
the today implementation is kernel 2.6.37 based, source at:
www.spadim.com.br/raid1/

any help is welcome
thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/